aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/envutil.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/envutil.rb')
-rw-r--r--test/ruby/envutil.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/ruby/envutil.rb b/test/ruby/envutil.rb
index 19290c6f56..d96da1308f 100644
--- a/test/ruby/envutil.rb
+++ b/test/ruby/envutil.rb
@@ -74,11 +74,14 @@ module EnvUtil
return stdout, stderr, status
end
ensure
+ [th_stdout, th_stderr].each do |th|
+ th.kill if th
+ end
[in_c, in_p, out_c, out_p, err_c, err_p].each do |io|
io.close if io && !io.closed?
end
[th_stdout, th_stderr].each do |th|
- (th.kill; th.join) if th
+ th.join if th
end
end
module_function :invoke_ruby