summaryrefslogtreecommitdiff
path: root/test/ruby/test_process.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_process.rb')
-rw-r--r--test/ruby/test_process.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb
index a0b08dd110..bb56834dc0 100644
--- a/test/ruby/test_process.rb
+++ b/test/ruby/test_process.rb
@@ -1009,6 +1009,15 @@ class TestProcess < Test::Unit::TestCase
}
end
+ def test_close_others_default_false
+ IO.pipe do |r,w|
+ w.close_on_exec = false
+ src = "IO.new(#{w.fileno}).puts(:hi)"
+ assert_equal true, system(*%W(#{RUBY} --disable=gems -e #{src}))
+ assert_equal "hi\n", r.gets
+ end
+ end
+
def test_execopts_redirect_self
begin
with_pipe {|r, w|