Skip to content

Do not require rdoc from rdoc.gemspec #505

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 31, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions rdoc.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# -*- encoding: utf-8 -*-
$:.unshift File.expand_path("../lib", __FILE__)
require 'rdoc'
require_relative "lib/rdoc"
Copy link
Member

@aycabta aycabta Aug 29, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost string literals for require in RDoc are with single-quote. The command below is for listing require with double-quote:

$ git grep '^require "'           
bin/console:require "bundler/setup"                        
bin/console:require "rdoc"                                 
bin/console:require "irb"                                  
lib/rdoc/ruby_lex.rb:require "e2mmap"                      
lib/rdoc/ruby_lex.rb:require "irb/slex"                    
lib/rdoc/ruby_lex.rb:require "stringio"                    
test/test_rdoc_parser_ruby.rb:require "\#{prefix}/a_library"

The bin/console is auto-generated code as you know, the lib/rdoc/ruby_lex.rb is forked source code from IRB and last one is dynamic string. So I think what you should use single-quote for this require.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I chose double-quotes following the existing string literals in rdoc.gemspec. Do you want me to replace them all?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I explained incompletely. The double quotes for require are stemmed from historical background. I just wanted to say about most require are used with single quote. But it's not important if I really think about it.


Gem::Specification.new do |s|
s.name = "rdoc"
Expand Down Expand Up @@ -54,4 +52,5 @@ RDoc includes the +rdoc+ and +ri+ tools for generating and displaying documentat
s.add_development_dependency("racc", "> 1.4.10")
s.add_development_dependency("kpeg")
s.add_development_dependency("minitest", "~> 4")
s.add_development_dependency("json")
end