[前][次][番号順一覧][スレッド一覧]

ruby-changes:63133

From: Yusuke <ko1@a...>
Date: Fri, 25 Sep 2020 23:40:15 +0900 (JST)
Subject: [ruby-changes:63133] 79063d8cbf (master): test/ruby/test_enumerator.rb: remove capture_io that is no longer needed

https://git.ruby-lang.org/ruby.git/commit/?id=79063d8cbf

From 79063d8cbfb7ce4740774289252a2a20dc9a5dc1 Mon Sep 17 00:00:00 2001
From: Yusuke Endoh <mame@r...>
Date: Fri, 25 Sep 2020 23:38:01 +0900
Subject: 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 996af2ce086249e904b2ce95ab2fcd1de7d757be, thus capture_io
is no longer needed.

diff --git a/test/ruby/test_enumerator.rb b/test/ruby/test_enumerator.rb
index b619150..8544c42 100644
--- a/test/ruby/test_enumerator.rb
+++ b/test/ruby/test_enumerator.rb
@@ -69,9 +69,7 @@ class TestEnumerator < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_enumerator.rb#L69
 
   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 }
 
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]