Skip to content

Commit

Permalink
test/ruby/test_enumerator.rb: remove capture_io that is no longer needed
Browse files Browse the repository at this point in the history
The deprecation warning was disabled, and the code to check the warning
was removed at 996af2c, thus capture_io
is no longer needed.
  • Loading branch information
mame committed Sep 25, 2020
1 parent e4b2c4f commit 79063d8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions test/ruby/test_enumerator.rb
Expand Up @@ -69,9 +69,7 @@ def (o = Object.new).each

def test_initialize
assert_equal([1, 2, 3], @obj.to_enum(:foo, 1, 2, 3).to_a)
_, err = capture_io do
assert_equal([1, 2, 3], Enumerator.new(@obj, :foo, 1, 2, 3).to_a)
end
assert_equal([1, 2, 3], Enumerator.new(@obj, :foo, 1, 2, 3).to_a)
assert_equal([1, 2, 3], Enumerator.new { |y| i = 0; loop { y << (i += 1) } }.take(3))
assert_raise(ArgumentError) { Enumerator.new }

Expand Down

0 comments on commit 79063d8

Please sign in to comment.