Support "require" as variable name in RDoc
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1344cfba26
commit
f5666a648d
@ -9,3 +9,8 @@
|
|||||||
# the lib/ directory (which has its own .document file)
|
# the lib/ directory (which has its own .document file)
|
||||||
|
|
||||||
lib
|
lib
|
||||||
|
|
||||||
|
|
||||||
|
# and some of the ext/ directory (which has its own .document file)
|
||||||
|
|
||||||
|
ext
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
Sun Oct 10 12:32:08 2004 Dave Thomas <dave@pragprog.com>
|
||||||
|
|
||||||
|
* lib/rdoc/parsers/parse_rb.rb (RDoc::parse_require): Allow 'require'
|
||||||
|
to be used as a variable name
|
||||||
|
|
||||||
Sun Oct 10 02:49:14 2004 Minero Aoki <aamine@loveruby.net>
|
Sun Oct 10 02:49:14 2004 Minero Aoki <aamine@loveruby.net>
|
||||||
|
|
||||||
* ext/ripper/lib/ripper/filter.rb: require ripper/tokenizer.
|
* ext/ripper/lib/ripper/filter.rb: require ripper/tokenizer.
|
||||||
|
@ -2406,10 +2406,12 @@ module RDoc
|
|||||||
when TkDSTRING
|
when TkDSTRING
|
||||||
warn "Skipping require of dynamic string: #{tk.text}"
|
warn "Skipping require of dynamic string: #{tk.text}"
|
||||||
else
|
else
|
||||||
error("Unknown argument type to require: #{tk}")
|
warn "'require' used as variable"
|
||||||
end
|
end
|
||||||
if name
|
if name
|
||||||
context.add_require(Require.new(name, comment))
|
context.add_require(Require.new(name, comment))
|
||||||
|
else
|
||||||
|
unget_tk(tk)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user