diff options
Diffstat (limited to 'test/stringio/test_stringio.rb')
-rw-r--r-- | test/stringio/test_stringio.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/stringio/test_stringio.rb b/test/stringio/test_stringio.rb index 7b99d62f51..9a041c2148 100644 --- a/test/stringio/test_stringio.rb +++ b/test/stringio/test_stringio.rb @@ -148,6 +148,13 @@ class TestStringIO < Test::Unit::TestCase f.write(s) } assert_equal(Encoding::ASCII_8BIT, f.string.encoding, bug10285) + + bug11827 = '[ruby-core:72189] [Bug #11827]' + f = StringIO.new("foo\x83".freeze) + assert_nothing_raised(RuntimeError, bug11827) { + f.set_encoding(Encoding::ASCII_8BIT) + } + assert_equal("foo\x83".b, f.gets) end def test_mode_error |