From 466f7f6c81fe36bed2c2359f0577c67492d82fd4 Mon Sep 17 00:00:00 2001 From: marcandre Date: Mon, 16 Jul 2012 15:19:03 +0000 Subject: Revert r33924. * proc.c (rb_proc_arity): Fix Proc#arity in case of optional arguments [bug #5694] [rubyspec:b8b259] [rubyspec:184c8100f] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_proc.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'test/ruby/test_proc.rb') diff --git a/test/ruby/test_proc.rb b/test/ruby/test_proc.rb index 3deb5c0109..ac8d568cde 100644 --- a/test/ruby/test_proc.rb +++ b/test/ruby/test_proc.rb @@ -68,6 +68,7 @@ class TestProc < Test::Unit::TestCase assert_equal(-1, proc{|*|}.arity) assert_equal(-3, proc{|x, *y, z|}.arity) assert_equal(-4, proc{|x, *y, z, a|}.arity) + assert_equal(-1, ->(a=42){}.arity) assert_arity(0) {} assert_arity(0) {||} -- cgit v1.2.3