ruby-changes:51475
From: kazu <ko1@a...>
Date: Mon, 18 Jun 2018 00:42:41 +0900 (JST)
Subject: [ruby-changes:51475] kazu:r63685 (trunk): Remove needless closed?
kazu 2018-06-18 00:42:35 +0900 (Mon, 18 Jun 2018) New Revision: 63685 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63685 Log: Remove needless closed? Modified files: trunk/test/test_open3.rb Index: test/test_open3.rb =================================================================== --- test/test_open3.rb (revision 63684) +++ test/test_open3.rb (revision 63685) @@ -55,9 +55,9 @@ class TestOpen3 < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/test_open3.rb#L55 i.close assert_equal("baz", o.read) ensure - i.close if !i.closed? - o.close if !o.closed? - e.close if !e.closed? + i.close + o.close + e.close t.join end @@ -104,8 +104,8 @@ class TestOpen3 < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/test_open3.rb#L104 r, w = IO.pipe yield r, w ensure - r.close if !r.closed? - w.close if !w.closed? + r.close + w.close end def with_reopen(io, arg) @@ -114,7 +114,7 @@ class TestOpen3 < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/test_open3.rb#L114 yield old ensure io.reopen(old) - old.close if old && !old.closed? + old.close end def test_popen2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/