ruby-changes:31039
From: nobu <ko1@a...>
Date: Wed, 2 Oct 2013 16:48:25 +0900 (JST)
Subject: [ruby-changes:31039] nobu:r43118 (trunk): test_io.rb: add test
nobu 2013-10-02 16:48:19 +0900 (Wed, 02 Oct 2013) New Revision: 43118 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43118 Log: test_io.rb: add test * test/ruby/test_io.rb (tesst_pid_after_close_read): test for r43117. Modified files: trunk/test/ruby/test_io.rb Index: test/ruby/test_io.rb =================================================================== --- test/ruby/test_io.rb (revision 43117) +++ test/ruby/test_io.rb (revision 43118) @@ -1409,6 +1409,17 @@ class TestIO < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_io.rb#L1409 assert_raise(IOError) { pipe.pid } end + def tesst_pid_after_close_read + pid1 = pid2 = nil + IO.popen(["echo", ""], "r+") do |io| + pid1 = io.pid + io.close_read + pid2 = io.pid + end + assert_not_nil(pid1) + assert_equal(pid1, pid2) + end + def make_tempfile t = Tempfile.new("test_io") t.binmode -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/