aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_io.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_io.rb')
-rw-r--r--test/ruby/test_io.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index 4cfd873a0d..170b08d310 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -2351,7 +2351,7 @@ End
def test_flush_in_finalizer1
require 'tempfile'
bug3910 = '[ruby-dev:42341]'
- Tempfile.open("bug3910") {|t|
+ t = Tempfile.open("bug3910") {|t|
path = t.path
t.close
fds = []
@@ -2362,10 +2362,11 @@ End
f.print "hoge"
}
end
- t.unlink
+ t
}
ensure
GC.start
+ t.unlink
end
def test_flush_in_finalizer2