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 | 470992487f00982151ed73ac914280613a63ce51 (patch) | |
| tree | 72ab9bd358faa0b6522e9decff58f94c9c512c4e /test/ruby | |
| parent | 078b4cb1ac409ebb3e2cf6e7fc4bb47c8b1009eb (diff) | |
| download | ruby-470992487f00982151ed73ac914280613a63ce51.tar.gz ruby-470992487f00982151ed73ac914280613a63ce51.tar.xz ruby-470992487f00982151ed73ac914280613a63ce51.zip | |
* 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: http://svn.ruby-lang.org/repos/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 d723470dd..a0f3428c3 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 |
