mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
dcca25f003
commit
a5b77d1cf7
2 changed files with 12 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
Tue Dec 14 13:52:19 2010 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* 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@ruby-lang.org>
|
||||
|
||||
* ext/zlib/zlib.c (gzfile_s_open): should close the IO if some error
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue