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:
dave 2004-10-10 03:35:51 +00:00
Родитель 1344cfba26
Коммит f5666a648d
3 изменённых файлов: 13 добавлений и 1 удалений

Просмотреть файл

@ -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