1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* parse.y: fix node construction (around f_margs).

[ruby-dev:31143]
* bootstraptest/test_block.rb: add a test for above.
* insnhelper.ci: fix indent.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2007-07-07 07:16:05 +00:00
parent 174b77b280
commit 0ec2b20d2f
4 changed files with 46 additions and 6 deletions

View file

@ -336,6 +336,36 @@ assert_equal %q{[1, nil]}, %q{
}
}
# block parameter (shouldn't SEGV: [ruby-dev:31143])
assert_equal '0', %q{
def m()
end
m {|(v0,*,(*)),|}
m {|(*v0,(*)),|}
m {|(v0,*v1,(*)),|}
m {|((v0,*v1,v2)),|}
m {|(v0,*v1,v2),|}
m {|(v0,*v1,(v2)),|}
m {|((*),*v0,v1),|}
m {|((v0),*v1,v2),|}
m {|(v0,v1,*v2,v3),|}
m {|v0,(v1,*v2,v3),|}
m {|(v0,*v1,v2),v3,|}
m {|(v0,*v1,v2)|}
m {|(v0,*v1,v2),&v3|}
m {|(v0,*v1,v2),*|}
m {|(v0,*v1,v2),*,&v3|}
m {|*,(v0,*v1,v2)|}
m {|*,(v0,*v1,v2),&v3|}
m {|v0,*,(v1,*v2,v3)|}
m {|v0,*,(v1,*v2,v3),&v4|}
m {|(v0,*v1,v2),*,v3|}
m {|(v0,*v1,v2),*,v3,&v4|}
m {|(v0, *v1, v2)|}
m {|(*,v)|}
0
}
# [ruby-dev:31147]
assert_equal 'nil', %q{
def m
@ -343,3 +373,4 @@ assert_equal 'nil', %q{
end
m{|&b| b}.inspect
}