summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-19 17:46:17 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-19 17:46:17 +0000
commitd874dde2827e96dbbb09f89f4d9e671c43725eef (patch)
tree72ab9bd358faa0b6522e9decff58f94c9c512c4e /test
parent42244c17f648823f1aa0d645f37980cf28c2a779 (diff)
* 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')
-rw-r--r--test/ruby/test_m17n.rb5
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