1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2014-05-26 03:42:27 +00:00
parent eecf8b71b9
commit fd372dc8a2

View file

@ -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