diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-23 10:49:07 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-23 10:49:07 +0000 |
commit | 91c7169daf6f900ca03c58a7743a0b991e8f5371 (patch) | |
tree | 769b871e4d5595b6bf694ff336305cb2e4677b80 /test | |
parent | a46abacacd00e7f9940bae7680383df0d2684f79 (diff) |
merges r30063 from trunk into ruby_1_9_2.
--
* ext/stringio/stringio.c (strio_getline): round upto next char
boundary. [ruby-dev:42674]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/stringio/test_stringio.rb | 6 |
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 |