diff options
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" |
