From 1d0ddd4218e701d086b3e4f21fd38183fa3a4e8a Mon Sep 17 00:00:00 2001 From: naruse Date: Mon, 28 May 2012 02:40:32 +0000 Subject: merge revision(s) 34753: * 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/branches/ruby_1_9_3@35826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_io.rb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'test/ruby') diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 36dab0815d..39dc784050 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -1951,15 +1951,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 -- cgit v1.2.3