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

ruby-changes:67973

From: Hiroshi <ko1@a...>
Date: Mon, 13 Sep 2021 21:15:49 +0900 (JST)
Subject: [ruby-changes:67973] ec6f04c092 (master): Use capture_output instead of capture_io

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

From ec6f04c092027102369acfe19368e65ee07d8b52 Mon Sep 17 00:00:00 2001
From: Hiroshi SHIBATA <hsbt@r...>
Date: Mon, 13 Sep 2021 21:14:42 +0900
Subject: Use capture_output instead of capture_io

---
 test/ruby/test_enumerator.rb             | 2 +-
 test/ruby/test_pack.rb                   | 4 ++--
 tool/lib/test/unit/assertions.rb         | 2 +-
 tool/test/testunit/test_minitest_unit.rb | 4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/test/ruby/test_enumerator.rb b/test/ruby/test_enumerator.rb
index 4342c10..c823b79 100644
--- a/test/ruby/test_enumerator.rb
+++ b/test/ruby/test_enumerator.rb
@@ -79,7 +79,7 @@ class TestEnumerator < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_enumerator.rb#L79
     assert_raise(NoMethodError) { enum.each {} }
     enum.freeze
     assert_raise(ArgumentError) {
-      capture_io do
+      capture_output do
         # warning: Enumerator.new without a block is deprecated; use Object#to_enum
         enum.__send__(:initialize, @obj, :foo)
       end
diff --git a/test/ruby/test_pack.rb b/test/ruby/test_pack.rb
index 60edd00..c9ca9c3 100644
--- a/test/ruby/test_pack.rb
+++ b/test/ruby/test_pack.rb
@@ -764,7 +764,7 @@ EXPECTED https://github.com/ruby/ruby/blob/trunk/test/ruby/test_pack.rb#L764
 
     $VERBOSE = true
 
-    _, err = capture_io do
+    _, err = capture_output do
       assert_equal "\000", [0].pack("*U")
     end
 
@@ -783,7 +783,7 @@ EXPECTED https://github.com/ruby/ruby/blob/trunk/test/ruby/test_pack.rb#L783
 
     $VERBOSE = true
 
-    _, err = capture_io do
+    _, err = capture_output do
       assert_equal [0], "\000".unpack("*U")
     end
 
diff --git a/tool/lib/test/unit/assertions.rb b/tool/lib/test/unit/assertions.rb
index ecbcf74..065a7a0 100644
--- a/tool/lib/test/unit/assertions.rb
+++ b/tool/lib/test/unit/assertions.rb
@@ -214,7 +214,7 @@ module Test https://github.com/ruby/ruby/blob/trunk/tool/lib/test/unit/assertions.rb#L214
       # See also: #assert_silent
 
       def assert_output stdout = nil, stderr = nil
-        out, err = capture_io do
+        out, err = capture_output do
           yield
         end
 
diff --git a/tool/test/testunit/test_minitest_unit.rb b/tool/test/testunit/test_minitest_unit.rb
index ee20d1b..7bbcade 100644
--- a/tool/test/testunit/test_minitest_unit.rb
+++ b/tool/test/testunit/test_minitest_unit.rb
@@ -1070,11 +1070,11 @@ class TestMiniTestUnitTestCase < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/tool/test/testunit/test_minitest_unit.rb#L1070
     end
   end
 
-  def test_capture_io
+  def test_capture_output
     @assertion_count = 0
 
     non_verbose do
-      out, err = capture_io do
+      out, err = capture_output do
         puts 'hi'
         $stderr.puts 'bye!'
       end
-- 
cgit v1.1


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

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