diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-19 17:46:17 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-19 17:46:17 +0000 |
commit | d874dde2827e96dbbb09f89f4d9e671c43725eef (patch) | |
tree | 72ab9bd358faa0b6522e9decff58f94c9c512c4e /test/ruby | |
parent | 42244c17f648823f1aa0d645f37980cf28c2a779 (diff) | |
download | ruby-d874dde2827e96dbbb09f89f4d9e671c43725eef.tar.gz |
* string.c (rb_str_each_line): should consider rslen.
* string.c (rb_str_buf_append): should propagate encoding.
* string.c (rb_str_each_line): ditto.
* test/ruby/test_m17n.rb (TestM17N::test_str_each_line): should
check encoding as well.
* test/ruby/test_m17n.rb (TestM17N::test_str_each_line): empty
array can not propagate encoding; should not check.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14343 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_m17n.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb index d723470dd2..a0f3428c3d 100644 --- a/test/ruby/test_m17n.rb +++ b/test/ruby/test_m17n.rb @@ -1201,7 +1201,10 @@ class TestM17N < Test::Unit::TestCase assert_equal(s1.encoding, line.encoding) lines << line } - assert_equal(s1, lines.join('')) + next if lines.size == 0 + s2 = lines.join('') + assert_equal(s1.encoding, s2.encoding) + assert_equal(s1, s2) } end |