diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_iterator.rb | 4 | ||||
-rw-r--r-- | test/ruby/test_proc.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/test/ruby/test_iterator.rb b/test/ruby/test_iterator.rb index 38e795ee72..1c293069c4 100644 --- a/test/ruby/test_iterator.rb +++ b/test/ruby/test_iterator.rb @@ -311,8 +311,8 @@ class TestIterator < Test::Unit::TestCase block = get_block{11} lambda = lambda{44} - assert_equal(-1, block.arity) - assert_equal(-1, lambda.arity) + assert_equal(0, block.arity) + assert_equal(0, lambda.arity) assert_equal(0, lambda{||}.arity) assert_equal(1, lambda{|a|}.arity) assert_equal(1, lambda{|a,|}.arity) diff --git a/test/ruby/test_proc.rb b/test/ruby/test_proc.rb index f0b78ffb23..8d8b17e0d7 100644 --- a/test/ruby/test_proc.rb +++ b/test/ruby/test_proc.rb @@ -50,7 +50,7 @@ class TestProc < Test::Unit::TestCase end def test_arity - assert_equal(-1, proc{}.arity) + assert_equal(0, proc{}.arity) assert_equal(0, proc{||}.arity) assert_equal(1, proc{|x|}.arity) assert_equal(2, proc{|x, y|}.arity) @@ -58,7 +58,7 @@ class TestProc < Test::Unit::TestCase assert_equal(-1, proc{|*x|}.arity) assert_equal(-1, proc{|*|}.arity) - assert_arity(-1) {} + assert_arity(0) {} assert_arity(0) {||} assert_arity(1) {|x|} assert_arity(2) {|x, y|} |