diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-12-21 11:21:54 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-12-21 11:21:54 +0000 |
commit | 8e432d9a5b4b5bcc3b9ba7b07bb98bb3ed2182f3 (patch) | |
tree | eafd6b640c7add845dbe6329fcd732a2eb6ac951 /activesupport/test | |
parent | c95002c284add2da69845f2a9407c5dd6592cb62 (diff) | |
download | rails-8e432d9a5b4b5bcc3b9ba7b07bb98bb3ed2182f3.tar.gz rails-8e432d9a5b4b5bcc3b9ba7b07bb98bb3ed2182f3.tar.bz2 rails-8e432d9a5b4b5bcc3b9ba7b07bb98bb3ed2182f3.zip |
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
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 |