summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--lib/rdoc/parsers/parse_rb.rb39
2 files changed, 27 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index 56a7dd5c31..ea27bacc60 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -51,6 +51,12 @@ Wed Apr 14 11:29:56 2004 WATANABE Hirofumi <eban@ruby-lang.org>
* numeric.c (flo_eq): workaround for bcc32's bug.
(ruby-bugs-ja:PR#594)
+Wed Apr 14 11:06:38 2004 Dave Thomas <dave@pragprog.com>
+
+ * lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::scan): Changed
+ behavior of :enddoc: -- it now unconditionally terminates
+ processing of the current file.
+
Wed Apr 14 10:57:40 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
* defines.h: include <net/socket.h> to get fd_set definition in BeOS.
diff --git a/lib/rdoc/parsers/parse_rb.rb b/lib/rdoc/parsers/parse_rb.rb
index 1a660c1f31..42e942ca38 100644
--- a/lib/rdoc/parsers/parse_rb.rb
+++ b/lib/rdoc/parsers/parse_rb.rb
@@ -1400,22 +1400,24 @@ module RDoc
@unget_read = []
@read = []
catch(:eof) do
- begin
- parse_toplevel_statements(@top_level)
- rescue Exception => e
- $stderr.puts "\n\n"
- $stderr.puts "RDoc failure in #@input_file_name at or around " +
- "line #{@scanner.line_no} column #{@scanner.char_no}"
- $stderr.puts
- $stderr.puts "Before reporting this, could you check that the file"
- $stderr.puts "you're documenting compiles cleanly--RDoc is not a"
- $stderr.puts "full Ruby parser, and gets confused easily if fed"
- $stderr.puts "invalid programs."
- $stderr.puts
- $stderr.puts "The internal error was:\n\n"
-
- e.set_backtrace(e.backtrace[0,4])
- raise
+ catch(:enddoc) do
+ begin
+ parse_toplevel_statements(@top_level)
+ rescue Exception => e
+ $stderr.puts "\n\n"
+ $stderr.puts "RDoc failure in #@input_file_name at or around " +
+ "line #{@scanner.line_no} column #{@scanner.char_no}"
+ $stderr.puts
+ $stderr.puts "Before reporting this, could you check that the file"
+ $stderr.puts "you're documenting compiles cleanly--RDoc is not a"
+ $stderr.puts "full Ruby parser, and gets confused easily if fed"
+ $stderr.puts "invalid programs."
+ $stderr.puts
+ $stderr.puts "The internal error was:\n\n"
+
+ e.set_backtrace(e.backtrace[0,4])
+ raise
+ end
end
end
@top_level
@@ -2278,8 +2280,9 @@ module RDoc
""
when "enddoc"
- context.done_documenting = true
- ""
+ #context.done_documenting = true
+ #""
+ throw :enddoc
when "main"
options = Options.instance