提交 8e432d9a 编写于 作者: J Jeremy Kemper

Multibyte: skip String#each_char test for Ruby 1.9


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8461 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 c95002c2
......@@ -167,14 +167,15 @@ def test_starts_ends_with_alias
assert !s.end_with?('el')
end
# FIXME: Ruby 1.9
def test_each_char_with_utf8_string_when_kcode_is_utf8
old_kcode, $KCODE = $KCODE, 'UTF8'
'€2.99'.each_char do |char|
assert_not_equal 1, char.length
break
if RUBY_VERSION < '1.9'
def test_each_char_with_utf8_string_when_kcode_is_utf8
old_kcode, $KCODE = $KCODE, 'UTF8'
'€2.99'.each_char do |char|
assert_not_equal 1, char.length
break
end
ensure
$KCODE = old_kcode
end
ensure
$KCODE = old_kcode
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册