summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2020-09-27 21:31:13 +0200
committerBenoit Daloze <eregontp@gmail.com>2020-09-27 21:32:26 +0200
commit41eba95920794b85a51b0abfe164d29840c420b1 (patch)
treea7bc4c592c86511c46658462577a8b137e1a0a71
parent9a951c09317032fd1c2a3b5506f70b5e83e0464b (diff)
Revert the first diff of "Use Tempfile.create instead of Tempfile.open in test_io.rb"
* This partially reverts commit dead7478748a828c45e16134fca812bc7771344e. * Windows will not allow a file to be unlinked if any file handles exist, see https://github.com/ruby/ruby/pull/3597
-rw-r--r--test/ruby/test_io.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index 4bb8a1d1ff..f02ce6d31a 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -2737,7 +2737,7 @@ __END__
def test_flush_in_finalizer1
bug3910 = '[ruby-dev:42341]'
- Tempfile.create("bug3910") {|t|
+ tmp = Tempfile.open("bug3910") {|t|
path = t.path
t.close
fds = []
@@ -2757,6 +2757,7 @@ __END__
f.close
end
}
+ tmp.close!
end
def test_flush_in_finalizer2