From 81629f05312cc4df2193a17f13c581eda174d9af Mon Sep 17 00:00:00 2001 From: glass Date: Wed, 18 Sep 2013 14:34:04 +0000 Subject: * string.c (rb_str_enumerate_lines): make String#each_line and #lines not raise invalid byte sequence error when it is called with an argument. The patch also causes performance improvement. [ruby-dev:47549] [Bug #8698] * test/ruby/test_m17n_comb.rb (test_str_each_line): remove assertions which check that String#each_line and #lines will raise an error if the receiver includes invalid byte sequence. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_m17n_comb.rb | 5 ----- 1 file changed, 5 deletions(-) (limited to 'test/ruby') diff --git a/test/ruby/test_m17n_comb.rb b/test/ruby/test_m17n_comb.rb index 1fa3d7d481..fd715240e8 100644 --- a/test/ruby/test_m17n_comb.rb +++ b/test/ruby/test_m17n_comb.rb @@ -798,17 +798,12 @@ class TestM17NComb < Test::Unit::TestCase def test_str_each_line combination(STRINGS, STRINGS) {|s1, s2| - if !s1.valid_encoding? || !s2.valid_encoding? - assert_raise(ArgumentError, Encoding::CompatibilityError) { s1.each_line(s2) {} } - next - end if !s1.ascii_only? && !s2.ascii_only? && s1.encoding != s2.encoding assert_raise(Encoding::CompatibilityError) { s1.each_line(s2) {} } next end lines = [] enccall(s1, :each_line, s2) {|line| - assert(line.valid_encoding?) assert_equal(s1.encoding, line.encoding) lines << line } -- cgit v1.2.3