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:
parent
eecf8b71b9
commit
fd372dc8a2
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue