diff options
author | dave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-10-10 03:35:51 +0000 |
---|---|---|
committer | dave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-10-10 03:35:51 +0000 |
commit | ff17f9ecbd51dd19c56031d6cd8aa28e82ec5e8f (patch) | |
tree | 24cbf1566e4d8fe9c9e8b0e22055c9e39524ec1f | |
parent | 0f9ab0730d0aa8008d43f3082a325c37f963506d (diff) |
Support "require" as variable name in RDoc
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | .document | 5 | ||||
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/rdoc/parsers/parse_rb.rb | 4 |
3 files changed, 13 insertions, 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 + Sat Oct 9 21:23:37 2004 Kouhei Sutou <kou@cozmixng.org> * lib/rss/converter.rb: changed to try to use Iconv for default diff --git a/lib/rdoc/parsers/parse_rb.rb b/lib/rdoc/parsers/parse_rb.rb index 90194e0699..e862cc71e1 100644 --- a/lib/rdoc/parsers/parse_rb.rb +++ b/lib/rdoc/parsers/parse_rb.rb @@ -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 |