diff options
author | Sam Stephenson <sam@37signals.com> | 2005-12-27 03:11:03 +0000 |
---|---|---|
committer | Sam Stephenson <sam@37signals.com> | 2005-12-27 03:11:03 +0000 |
commit | e567a5eb1afe1ac38f1da37f1c1e3922bbf79d2a (patch) | |
tree | 47baca37670f0ad23d803c2f939199147efe4287 /activesupport/test/core_ext/string_ext_test.rb | |
parent | 0b55ce7191b167d67ec7ccc7eb8db2e5fac4f2e1 (diff) | |
download | rails-e567a5eb1afe1ac38f1da37f1c1e3922bbf79d2a.tar.gz rails-e567a5eb1afe1ac38f1da37f1c1e3922bbf79d2a.tar.bz2 rails-e567a5eb1afe1ac38f1da37f1c1e3922bbf79d2a.zip |
Add ActiveSupport::JSON and Object#to_json for converting Ruby objects to JSON strings
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3356 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/test/core_ext/string_ext_test.rb')
-rw-r--r-- | activesupport/test/core_ext/string_ext_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/string_ext_test.rb b/activesupport/test/core_ext/string_ext_test.rb index 0e82badad7..92f57beb5f 100644 --- a/activesupport/test/core_ext/string_ext_test.rb +++ b/activesupport/test/core_ext/string_ext_test.rb @@ -89,4 +89,14 @@ class StringInflectionsTest < Test::Unit::TestCase assert s.ends_with?('lo') assert !s.ends_with?('el') end + + 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 end |