mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fix parse problem with complex yields
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d50547c22c
commit
38043dde9d
2 changed files with 20 additions and 2 deletions
16
ChangeLog
16
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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue