diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-14 04:54:20 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-14 04:54:20 +0000 |
commit | a5b77d1cf70d6d76141712dd6fb809cd8f7cb0d3 (patch) | |
tree | 47a4577ebcdcbcc7963a920b8b17e8dcbbf02498 /test/ruby | |
parent | dcca25f003df9fee9ce5f4e4172fe556be158aff (diff) | |
download | ruby-a5b77d1cf70d6d76141712dd6fb809cd8f7cb0d3.tar.gz |
* 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).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_io.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 73a16de4cc..f8186840f9 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -1677,7 +1677,9 @@ End 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 @@ End 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" |