From 41eba95920794b85a51b0abfe164d29840c420b1 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Sun, 27 Sep 2020 21:31:13 +0200 Subject: 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 --- test/ruby/test_io.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3