Skip to content

Commit

Permalink
- Close then unlink tempfiles on Windows. (nobu)
Browse files Browse the repository at this point in the history
[git-p4: depot-paths = "//src/minitest/dev/": change = 13274]
  • Loading branch information
zenspider committed Dec 5, 2021
1 parent 6570cec commit 3830cf1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/minitest/assertions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -562,15 +562,13 @@ def capture_subprocess_io

return captured_stdout.read, captured_stderr.read
ensure
captured_stdout.unlink
captured_stderr.unlink
$stdout.reopen orig_stdout
$stderr.reopen orig_stderr

orig_stdout.close
orig_stderr.close
captured_stdout.close
captured_stderr.close
captured_stdout.close!
captured_stderr.close!
end
end
end
Expand Down

0 comments on commit 3830cf1

Please sign in to comment.