diff options
author | Benoit Daloze <[email protected]> | 2020-08-29 12:17:07 +0200 |
---|---|---|
committer | Benoit Daloze <[email protected]> | 2020-08-29 12:23:23 +0200 |
commit | e8c3872555fc85640505974e6b1c39d315572689 (patch) | |
tree | d3efaa93985db2932c57d15729d18e3c0e1ca2d6 /test/ruby/test_io.rb | |
parent | ff323b2a5c56cdec93900af4d67f3811f946d9b8 (diff) |
Simplify Tempfile.open calls with a block as they now unlink the file automatically
Diffstat (limited to 'test/ruby/test_io.rb')
-rw-r--r-- | test/ruby/test_io.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index fafb082154..c528eea0ae 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -2814,7 +2814,7 @@ __END__ def test_flush_in_finalizer1 bug3910 = '[ruby-dev:42341]' - tmp = Tempfile.open("bug3910") {|t| + Tempfile.open("bug3910") {|t| path = t.path t.close fds = [] @@ -2826,7 +2826,6 @@ __END__ f.print "hoge" } end - t } ensure ObjectSpace.each_object(File) {|f| @@ -2834,7 +2833,6 @@ __END__ f.close end } - tmp.close! end def test_flush_in_finalizer2 @@ -2858,7 +2856,6 @@ __END__ end } end - t.close! } end |