summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-29 23:38:09 +0000
committerdave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-29 23:38:09 +0000
commitd18d86433d0eaf5877098b209d2138fa13efc032 (patch)
tree5b5f4ecc86d871ce585342b416bc8fabf9f8ce68
parent799ac5b1b27fee497dd3b9f133cbef33058811e4 (diff)
downloadruby-d18d86433d0eaf5877098b209d2138fa13efc032.tar.gz
ruby-d18d86433d0eaf5877098b209d2138fa13efc032.tar.xz
ruby-d18d86433d0eaf5877098b209d2138fa13efc032.zip
Fix parse problem with complex yields
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@5346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog16
-rw-r--r--lib/rdoc/parsers/parse_rb.rb6
2 files changed, 20 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 9e79223f7..cdad35ab7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+Tue Dec 30 08:32:32 2003 Dave Thomas <dave@pragprog.com>
+
+ * lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_method):
+ Handle undoing nesting of yield parameters correctly for:
+
+ def each_entry(&b) Dir.foreach(@path) {|f| yield P.new(f) } end
+
+
+Tue Dec 30 08:32:32 2003 Dave Thomas <dave@pragprog.com>
+
+ * lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_method): Handle undoing
+ nesting of yield parameters correctly for:
+
+ def each_entry(&block) Dir.foreach(@path) {|f| yield Pathname.new(f) } end
+
+
Mon Dec 29 12:51:02 2003 Dave Thomas <dave@pragprog.com>
* eval.c: Add RDoc for Kernel global functions.
diff --git a/lib/rdoc/parsers/parse_rb.rb b/lib/rdoc/parsers/parse_rb.rb
index 08d906c00..380025ef8 100644
--- a/lib/rdoc/parsers/parse_rb.rb
+++ b/lib/rdoc/parsers/parse_rb.rb
@@ -1987,11 +1987,13 @@ module RDoc
nest = 0
loop do
- puts("Param: #{tk}, #{@scanner.continue} " +
- "#{@scanner.lex_state} #{nest}") if $DEBUG
+ puts("Param: #{tk.inspect}, #{@scanner.continue} " +
+ "#{@scanner.lex_state} #{nest}") if $DEBUG
case tk
when TkSEMICOLON
break
+ when TkRBRACE
+ break
when TkLPAREN, TkfLPAREN
nest += 1
when end_token