ruby-changes:34087
From: usa <ko1@a...>
Date: Tue, 27 May 2014 20:28:46 +0900 (JST)
Subject: [ruby-changes:34087] usa:r46168 (trunk): * test/ruby/test_io.rb (test_flush_in_finalizer1): some opened fds are
usa 2014-05-27 20:28:34 +0900 (Tue, 27 May 2014) New Revision: 46168 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=46168 Log: * test/ruby/test_io.rb (test_flush_in_finalizer1): some opened fds are remain before GC, so unlink the tempfile is failed. Modified files: trunk/ChangeLog trunk/test/ruby/test_io.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 46167) +++ ChangeLog (revision 46168) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Tue May 27 20:26:06 2014 NAKAMURA Usaku <usa@r...> + + * test/ruby/test_io.rb (test_flush_in_finalizer1): some opened fds are + remain before GC, so unlink the tempfile is failed. + Tue May 27 19:07:26 2014 Tanaka Akira <akr@f...> * io.c (rb_io_autoclose_p): Don't raise on frozen IO. Index: test/ruby/test_io.rb =================================================================== --- test/ruby/test_io.rb (revision 46167) +++ test/ruby/test_io.rb (revision 46168) @@ -2351,7 +2351,7 @@ End https://github.com/ruby/ruby/blob/trunk/test/ruby/test_io.rb#L2351 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 https://github.com/ruby/ruby/blob/trunk/test/ruby/test_io.rb#L2362 f.print "hoge" } end - t.unlink + t } ensure GC.start + t.unlink end def test_flush_in_finalizer2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/