ruby-changes:63151
From: Benoit <ko1@a...>
Date: Mon, 28 Sep 2020 04:33:12 +0900 (JST)
Subject: [ruby-changes:63151] 41eba95920 (master): Revert the first diff of "Use Tempfile.create instead of Tempfile.open in test_io.rb"
https://git.ruby-lang.org/ruby.git/commit/?id=41eba95920 From 41eba95920794b85a51b0abfe164d29840c420b1 Mon Sep 17 00:00:00 2001 From: Benoit Daloze <eregontp@g...> 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 diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 4bb8a1d..f02ce6d 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -2737,7 +2737,7 @@ __END__ https://github.com/ruby/ruby/blob/trunk/test/ruby/test_io.rb#L2737 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__ https://github.com/ruby/ruby/blob/trunk/test/ruby/test_io.rb#L2757 f.close end } + tmp.close! end def test_flush_in_finalizer2 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/