ruby-changes:18183
From: usa <ko1@a...>
Date: Tue, 14 Dec 2010 14:07:47 +0900 (JST)
Subject: [ruby-changes:18183] Ruby:r30204 (trunk): * test/ruby/test_io.rb (test_flush_in_finalizer[12]): should close
usa 2010-12-14 13:54:20 +0900 (Tue, 14 Dec 2010) New Revision: 30204 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30204 Log: * test/ruby/test_io.rb (test_flush_in_finalizer[12]): should close temporary file because it's only used for taking pathname and unlinking the file after the end of the test (in GC phase). Modified files: trunk/ChangeLog trunk/test/ruby/test_io.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 30203) +++ ChangeLog (revision 30204) @@ -1,3 +1,9 @@ +Tue Dec 14 13:52:19 2010 NAKAMURA Usaku <usa@r...> + + * test/ruby/test_io.rb (test_flush_in_finalizer[12]): should close + temporary file because it's only used for taking pathname and + unlinking the file after the end of the test (in GC phase). + Tue Dec 14 13:34:33 2010 NAKAMURA Usaku <usa@r...> * ext/zlib/zlib.c (gzfile_s_open): should close the IO if some error Index: test/ruby/test_io.rb =================================================================== --- test/ruby/test_io.rb (revision 30203) +++ test/ruby/test_io.rb (revision 30204) @@ -1677,7 +1677,9 @@ def test_flush_in_finalizer1 require 'tempfile' bug3910 = '[ruby-dev:42341]' - path = Tempfile.new("bug3910").path + t = Tempfile.new("bug3910") + path = t.path + t.close fds = [] assert_nothing_raised(TypeError, bug3910) do 500.times { @@ -1693,7 +1695,9 @@ def test_flush_in_finalizer2 require 'tempfile' bug3910 = '[ruby-dev:42341]' - path = Tempfile.new("bug3910").path + t = Tempfile.new("bug3910") + path = t.path + t.close 1.times do io = open(path,"w") io.print "hoge" -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/