summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorglass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-18 14:34:04 +0000
committerglass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-18 14:34:04 +0000
commit81629f05312cc4df2193a17f13c581eda174d9af (patch)
tree13e310812d2b590a8ff3299caf3bf0f4105998dd /test/ruby
parent47beb63fe283426d6e4e03130a5eb06d770d772b (diff)
* 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
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_m17n_comb.rb5
1 files changed, 0 insertions, 5 deletions
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
}