mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* compile.c (setup_args), vm.c (invoke_block_from_c),
vm_insnhelper.c (caller_setup_args): fix of r30241. lambda block shoud check argument number. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0316582ebc
commit
cd3f980ea2
6 changed files with 14 additions and 2 deletions
|
@ -29,6 +29,7 @@ __END__
|
|||
a = 0
|
||||
2.times(&->(_){ a += 1 })
|
||||
assert_equal(a, 2)
|
||||
assert_raise(ArgumentError) {1.times(&->(){ a += 1 })}
|
||||
end
|
||||
|
||||
def test_call_rest_args
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue