aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_io.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2020-09-09 20:52:48 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-09-09 21:10:48 +0900
commitb194973dcd5eda6c9e256029ea39dc532ae18962 (patch)
tree30ebee5b13e2c3511ab3a41fc6219a779d89ad8f /test/ruby/test_io.rb
parent6997109fcaef0567f176e53dfc092aecc49f9ece (diff)
downloadruby-b194973dcd5eda6c9e256029ea39dc532ae18962.tar.gz
Revert the related commits about `Tempfile.open` change.
Start with https://github.com/ruby/ruby/commit/fa21985a7a2f8f52a8bd82bd12a724e9dca74934 to https://github.com/ruby/ruby/commit/d7492a0be885ea9f2b9f71e3e95582f9a859c439
Diffstat (limited to 'test/ruby/test_io.rb')
-rw-r--r--test/ruby/test_io.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index c528eea0ae..fafb082154 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -2814,7 +2814,7 @@ __END__
def test_flush_in_finalizer1
bug3910 = '[ruby-dev:42341]'
- Tempfile.open("bug3910") {|t|
+ tmp = Tempfile.open("bug3910") {|t|
path = t.path
t.close
fds = []
@@ -2826,6 +2826,7 @@ __END__
f.print "hoge"
}
end
+ t
}
ensure
ObjectSpace.each_object(File) {|f|
@@ -2833,6 +2834,7 @@ __END__
f.close
end
}
+ tmp.close!
end
def test_flush_in_finalizer2
@@ -2856,6 +2858,7 @@ __END__
end
}
end
+ t.close!
}
end