summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_process.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb
index 5d85ca3a18..0d2bc50b2d 100644
--- a/test/ruby/test_process.rb
+++ b/test/ruby/test_process.rb
@@ -1814,8 +1814,9 @@ class TestProcess < Test::Unit::TestCase
assert_separately([], "#{<<~"begin;"}\n#{<<~'end;'}")
begin;
io = File.open(IO::NULL)
+ io2 = io.dup
IO.popen("echo") {|f| io.reopen(f)}
- io.reopen(io.dup)
+ io.reopen(io2)
end;
end