mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fix parsing problem with yield within block
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
bd4dc9f671
commit
fb0878b310
2 changed files with 7 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
Mon May 3 09:47:24 2004 Dave Thomas <dave@pragprog.com>
|
||||
|
||||
* lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_method_or_yield_parameters):
|
||||
Fix parsing bug if yield called within 1 line block
|
||||
|
||||
Sun May 2 21:56:48 2004 Minero Aoki <aamine@loveruby.net>
|
||||
|
||||
* test/fileutils/test_fileutils.rb (rm_f, rm_r): test :force flag.
|
||||
|
|
|
@ -2020,6 +2020,8 @@ module RDoc
|
|||
when TkLBRACE
|
||||
nest += 1
|
||||
when TkRBRACE
|
||||
# we might have a.each {|i| yield i }
|
||||
unget_tk(tk) if nest.zero?
|
||||
nest -= 1
|
||||
break if nest <= 0
|
||||
when TkLPAREN, TkfLPAREN
|
||||
|
|
Loading…
Reference in a new issue