aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-10-10 03:35:51 +0000
committerdave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-10-10 03:35:51 +0000
commitf5666a648d0424e0b58ad636f3db762a3eedfa17 (patch)
tree8ecc21efea5fdc201a1b6fbd161f47c2453e9bb7
parent1344cfba26ac2ecbb206ddbb13e1a31dafceaba3 (diff)
downloadruby-f5666a648d0424e0b58ad636f3db762a3eedfa17.tar.gz
Support "require" as variable name in RDoc
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--.document5
-rw-r--r--ChangeLog5
-rw-r--r--lib/rdoc/parsers/parse_rb.rb4
3 files changed, 13 insertions, 1 deletions
diff --git a/.document b/.document
index 2471a9ce85..230c50e387 100644
--- a/.document
+++ b/.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
diff --git a/ChangeLog b/ChangeLog
index d56cf4bab6..915d96061e 100644
--- a/ChangeLog
+++ b/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
+
Sun Oct 10 02:49:14 2004 Minero Aoki <aamine@loveruby.net>
* ext/ripper/lib/ripper/filter.rb: require ripper/tokenizer.
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