summaryrefslogtreecommitdiff
path: root/test/ruby/test_process.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-31 08:17:16 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-31 08:17:16 +0000
commit4057ee5e8e054f3487a084d338f93cee9420c7eb (patch)
tree554e4a5291a61316d3eec6bf8affe9d226e451f5 /test/ruby/test_process.rb
parent302825ced8450d0e9b1d2d8458e1748a917459bc (diff)
io.c: fptr_copy_finalizer
* io.c (fptr_copy_finalizer): remove fptr from pipe_list when pipe became ordinary file, to fix access after free. to be finalized by pipe_finalize and being in pipe_list must match. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_process.rb')
-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