summaryrefslogtreecommitdiff
path: root/test/stringio/test_stringio.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/stringio/test_stringio.rb')
-rw-r--r--test/stringio/test_stringio.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/stringio/test_stringio.rb b/test/stringio/test_stringio.rb
index 30284faee2..b7327adced 100644
--- a/test/stringio/test_stringio.rb
+++ b/test/stringio/test_stringio.rb
@@ -378,6 +378,12 @@ class TestStringIO < Test::Unit::TestCase
assert_equal("a" * 10000 + "zz", f.gets("zz"))
f = StringIO.new("a" * 10000 + "zz!")
assert_equal("a" * 10000 + "zz!", f.gets("zzz"))
+
+ bug4112 = '[ruby-dev:42674]'
+ ["a".encode("utf-16be"), "\u3042"].each do |s|
+ assert_equal(s, StringIO.new(s).gets(1), bug4112)
+ assert_equal(s, StringIO.new(s).gets(nil, 1), bug4112)
+ end
end
def test_each