mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test/ruby/test_enumerator.rb: remove capture_io that is no longer needed
The deprecation warning was disabled, and the code to check the warning
was removed at 996af2ce08
, thus capture_io
is no longer needed.
This commit is contained in:
parent
e4b2c4fca5
commit
79063d8cbf
1 changed files with 1 additions and 3 deletions
|
@ -69,9 +69,7 @@ class TestEnumerator < Test::Unit::TestCase
|
|||
|
||||
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 }
|
||||
|
||||
|
|
Loading…
Reference in a new issue