summaryrefslogtreecommitdiffstats
path: root/test/ruby/test_m17n.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-18 06:18:31 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-18 06:18:31 +0000
commitf049ab55aa2114d91b1ad195df5a70f19fb219b4 (patch)
treed0723afb5968fa880cf19e7935f5e6f1d337cc43 /test/ruby/test_m17n.rb
parent02c6652ba29e069315f86679bde5ede1fb625018 (diff)
downloadruby-f049ab55aa2114d91b1ad195df5a70f19fb219b4.tar.gz
ruby-f049ab55aa2114d91b1ad195df5a70f19fb219b4.tar.xz
ruby-f049ab55aa2114d91b1ad195df5a70f19fb219b4.zip
* string.c (rb_str_each_line): fix newline size.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_m17n.rb')
-rw-r--r--test/ruby/test_m17n.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb
index c3e14f64c..5ff2a9da7 100644
--- a/test/ruby/test_m17n.rb
+++ b/test/ruby/test_m17n.rb
@@ -980,6 +980,12 @@ class TestM17N < Test::Unit::TestCase
def test_each_line
s = e("\xa3\xb0\xa3\xb1\xa3\xb2\xa3\xb3\xa3\xb4")
assert_raise(ArgumentError){s.each_line(a("\xa3\xb1")) {|l| }}
+ s = e("\xa4\xa2\nfoo")
+
+ actual = []
+ s.each_line {|line| actual << line }
+ expected = [e("\xa4\xa2\n"), e("foo")]
+ assert_equal(expected, actual)
end
def test_each_char