diff options
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_enumerator.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/ruby/test_enumerator.rb b/test/ruby/test_enumerator.rb index a24ff00d96..0839c2c3dd 100644 --- a/test/ruby/test_enumerator.rb +++ b/test/ruby/test_enumerator.rb @@ -301,8 +301,11 @@ class TestEnumerator < Test::Unit::TestCase yield end ary = [] - e = o.to_enum.each(ary) - e.next + e = o.to_enum { 1 } + assert_equal(1, e.size) + e_arg = e.each(ary) + assert_equal(nil, e_arg.size) + e_arg.next assert_equal([1], ary) end |