aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_io.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-22 17:33:10 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-22 17:33:10 +0000
commit4341c58c399e7f855da23b8d3ee795e0ff3e8397 (patch)
tree81a5b824aac1973cd25c8711508604da04aedf13 /test/ruby/test_io.rb
parentf56c6318de7332e1a6c930f2ddc8ed93ab55d96a (diff)
downloadruby-4341c58c399e7f855da23b8d3ee795e0ff3e8397.tar.gz
* io.c (rb_io_extract_modeenc): fail only if conflicting
text/binary modes given explicitly. [ruby-dev:45268][Bug #6055] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_io.rb')
-rw-r--r--test/ruby/test_io.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index a08c003403..eddc8cfde9 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -2023,15 +2023,18 @@ End
def test_open_mode
feature4742 = "[ruby-core:36338]"
+ bug6055 = '[ruby-dev:45268]'
mkcdtmpdir do
- refute_nil(f = File.open('symbolic', 'w'))
+ assert_not_nil(f = File.open('symbolic', 'w'))
f.close
- refute_nil(f = File.open('numeric', File::WRONLY|File::TRUNC|File::CREAT))
+ assert_not_nil(f = File.open('numeric', File::WRONLY|File::TRUNC|File::CREAT))
f.close
- refute_nil(f = File.open('hash-symbolic', :mode => 'w'))
+ assert_not_nil(f = File.open('hash-symbolic', :mode => 'w'))
f.close
- refute_nil(f = File.open('hash-numeric', :mode => File::WRONLY|File::TRUNC|File::CREAT), feature4742)
+ assert_not_nil(f = File.open('hash-numeric', :mode => File::WRONLY|File::TRUNC|File::CREAT), feature4742)
+ f.close
+ assert_nothing_raised(bug6055) {f = File.open('hash-symbolic', binmode: true)}
f.close
end
end