diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-01-23 07:56:20 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-01-23 07:56:20 +0000 |
commit | e7d83904cb0698d304fb8631ca34d4434152fd17 (patch) | |
tree | ba39632fd5558b388a80a10758c633b799ae9766 /test/ruby/test_io_m17n.rb | |
parent | 4c9968c9d9775a442346b0bd6d53e4bd95f69c15 (diff) | |
download | ruby-e7d83904cb0698d304fb8631ca34d4434152fd17.tar.gz |
* io.c (rb_io_extract_modeenc): set ASCII-8BIT if binmode is specified
with opthash. [ruby-core:42197] [Bug #5917]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_io_m17n.rb')
-rw-r--r-- | test/ruby/test_io_m17n.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_io_m17n.rb b/test/ruby/test_io_m17n.rb index b7460bf63e..24a11643cd 100644 --- a/test/ruby/test_io_m17n.rb +++ b/test/ruby/test_io_m17n.rb @@ -1042,6 +1042,11 @@ EOT f.set_encoding("iso-2022-jp") } } + assert_nothing_raised { + open(__FILE__, "r", binmode: true) {|f| + f.set_encoding("iso-2022-jp") + } + } end def test_write_conversion_fixenc |