summaryrefslogtreecommitdiff
path: root/test/lib/minitest
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-26 03:42:27 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-26 03:42:27 +0000
commitfd372dc8a244a215cb1561e32e0a5366cc0ba66e (patch)
treeb33158183e09a596cf7ba735a38f8feb1caa1f7d /test/lib/minitest
parenteecf8b71b9243efb07a30b14c8cdf634e7d117a6 (diff)
minitest/unit.rb: fix leaking tempfile
* test/lib/minitest/unit.rb (capture_subprocess_io): opened files can not be unlinked on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/lib/minitest')
-rw-r--r--test/lib/minitest/unit.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/lib/minitest/unit.rb b/test/lib/minitest/unit.rb
index 444e56e..54f34d5 100644
--- a/test/lib/minitest/unit.rb
+++ b/test/lib/minitest/unit.rb
@@ -522,10 +522,10 @@ module MiniTest
[captured_stdout.read, captured_stderr.read]
ensure
- captured_stdout.unlink
- captured_stderr.unlink
$stdout.reopen orig_stdout
$stderr.reopen orig_stderr
+ captured_stdout.close!
+ captured_stderr.close!
end
end
end