mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
3 changed files with 13 additions and 1 deletions
|
@ -9,3 +9,8 @@
|
|||
# the lib/ directory (which has its own .document file)
|
||||
|
||||
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>
|
||||
|
||||
* ext/ripper/lib/ripper/filter.rb: require ripper/tokenizer.
|
||||
|
|
|
@ -2406,10 +2406,12 @@ module RDoc
|
|||
when TkDSTRING
|
||||
warn "Skipping require of dynamic string: #{tk.text}"
|
||||
else
|
||||
error("Unknown argument type to require: #{tk}")
|
||||
warn "'require' used as variable"
|
||||
end
|
||||
if name
|
||||
context.add_require(Require.new(name, comment))
|
||||
else
|
||||
unget_tk(tk)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue