ruby-changes:48453
From: eregon <ko1@a...>
Date: Mon, 30 Oct 2017 01:18:54 +0900 (JST)
Subject: [ruby-changes:48453] eregon:r60567 (trunk): Fix spec which can fail if the pipe is closed before flushing in the subprocess
eregon 2017-10-30 01:18:50 +0900 (Mon, 30 Oct 2017) New Revision: 60567 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60567 Log: Fix spec which can fail if the pipe is closed before flushing in the subprocess Modified files: trunk/spec/ruby/core/io/popen_spec.rb Index: spec/ruby/core/io/popen_spec.rb =================================================================== --- spec/ruby/core/io/popen_spec.rb (revision 60566) +++ spec/ruby/core/io/popen_spec.rb (revision 60567) @@ -23,6 +23,7 @@ describe "IO.popen" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/io/popen_spec.rb#L23 it "raises IOError when writing a read-only pipe" do @io = IO.popen(ruby_cmd('puts "foo"'), "r") lambda { @io.write('foo') }.should raise_error(IOError) + @io.read.should == "foo\n" end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/