diff options
Diffstat (limited to 'bootstraptest/test_block.rb')
-rw-r--r-- | bootstraptest/test_block.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/bootstraptest/test_block.rb b/bootstraptest/test_block.rb index d90f5ede89..b4334ee44f 100644 --- a/bootstraptest/test_block.rb +++ b/bootstraptest/test_block.rb @@ -441,4 +441,17 @@ assert_equal 'ok', %q{ :ng end }, '[ruby-dev:31472]' +assert_equal 'ok', %q{ + class C + def each + yield [1,2] + yield 1,2 + end + end + vs1 = [] + C.new.each {|*v| vs1 << v } + vs2 = [] + C.new.to_enum.each {|*v| vs2 << v } + vs1 == vs2 ? :ok : :ng +}, '[ruby-dev:32329]' |