diff options
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/core_ext/string_ext_test.rb | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/activesupport/test/core_ext/string_ext_test.rb b/activesupport/test/core_ext/string_ext_test.rb index 427e7dfc57..3124d20bac 100644 --- a/activesupport/test/core_ext/string_ext_test.rb +++ b/activesupport/test/core_ext/string_ext_test.rb @@ -167,14 +167,15 @@ class StringInflectionsTest < Test::Unit::TestCase 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 |