summaryrefslogtreecommitdiff
path: root/test/test_tempfile.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-03-29 06:11:48 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-03-29 06:11:48 +0000
commitd0cb5c71ce3f179f14fddf5241cf0dcfe1599123 (patch)
treec18fd3ec24ca0e5bb6c0fd5423cad1e3420e4d49 /test/test_tempfile.rb
parentd894e1d9301e4a87a42fa57be6492a9e01e5948f (diff)
* lib/tempfile.rb (Tempfile#open): re-open with same mode and
options as initialize. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/test_tempfile.rb')
-rw-r--r--test/test_tempfile.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/test_tempfile.rb b/test/test_tempfile.rb
index 073a11e15a..e15d3f6a0c 100644
--- a/test/test_tempfile.rb
+++ b/test/test_tempfile.rb
@@ -294,6 +294,8 @@ puts Tempfile.new('foo').path
t = tempfile("TEST", mode: IO::BINARY)
if IO::BINARY.nonzero?
assert(t.binmode?)
+ t.open
+ assert(t.binmode?, 'binmode after reopen')
else
assert_equal(0600, t.stat.mode & 0777)
end