From cd3f980ea2652b169bbeede8b9135066ac656978 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 18 Dec 2010 07:02:35 +0000 Subject: * 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 --- test/ruby/test_lambda.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'test/ruby/test_lambda.rb') diff --git a/test/ruby/test_lambda.rb b/test/ruby/test_lambda.rb index 241042d2c7..6cbdd64385 100644 --- a/test/ruby/test_lambda.rb +++ b/test/ruby/test_lambda.rb @@ -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 -- cgit v1.2.3