Browse files

Support "require" as variable name in RDoc

git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information...
1 parent 145df87 commit 4ebc95246b5345f736503d0a78dcbdbbc3f89134 dave committed Oct 10, 2004
Showing with 13 additions and 1 deletion.
  1. +5 −0 .document
  2. +5 −0 ChangeLog
  3. +3 −1 lib/rdoc/parsers/parse_rb.rb
View
5 .document
@@ -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
View
5 ChangeLog
@@ -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
View
4 lib/rdoc/parsers/parse_rb.rb
@@ -2406,10 +2406,12 @@ def parse_require(context, comment)
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

0 comments on commit 4ebc952

Please sign in to comment.