From f32a843fef7eba4dcf9434710011dc247b0c289d Mon Sep 17 00:00:00 2001 From: usa Date: Tue, 27 May 2014 11:28:34 +0000 Subject: * test/ruby/test_io.rb (test_flush_in_finalizer1): some opened fds are remain before GC, so unlink the tempfile is failed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_io.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test/ruby') 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 -- cgit v1.2.3