aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext
diff options
context:
space:
mode:
authorNorman Clarke <norman@njclarke.com>2010-05-10 10:46:37 -0300
committerJeremy Kemper <jeremy@bitsweat.net>2010-05-21 12:24:54 -0700
commitf3abc8ac36055afed9fcc902c33ee146e066d17a (patch)
tree976019d8d451c2df0adc004d00e750b56fd6f6f6 /activesupport/test/core_ext
parentad4be3d75d46a04eb7a1d5a60bdfe68356a43e8b (diff)
downloadrails-f3abc8ac36055afed9fcc902c33ee146e066d17a.tar.gz
rails-f3abc8ac36055afed9fcc902c33ee146e066d17a.tar.bz2
rails-f3abc8ac36055afed9fcc902c33ee146e066d17a.zip
Use multibyte proxy class on 1.9, refactor Unicode.
Makes String#mb_chars on Ruby 1.9 return an instance of ActiveSupport::Multibyte::Chars to work around 1.9's lack of Unicode case folding. Refactors class methods from ActiveSupport::Multibyte::Chars into new Unicode module, adding other related functionality for consistency. [#4594 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'activesupport/test/core_ext')
-rw-r--r--activesupport/test/core_ext/string_ext_test.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/activesupport/test/core_ext/string_ext_test.rb b/activesupport/test/core_ext/string_ext_test.rb
index ea21e445e2..759b0ddcd6 100644
--- a/activesupport/test/core_ext/string_ext_test.rb
+++ b/activesupport/test/core_ext/string_ext_test.rb
@@ -245,11 +245,9 @@ class CoreExtStringMultibyteTest < ActiveSupport::TestCase
assert_kind_of ActiveSupport::Multibyte.proxy_class, UNICODE_STRING.mb_chars
end
end
- end
-
- if RUBY_VERSION >= '1.9'
- def test_mb_chars_returns_string
- assert_kind_of String, UNICODE_STRING.mb_chars
+ else
+ def test_mb_chars_returns_instance_of_proxy_class
+ assert_kind_of ActiveSupport::Multibyte.proxy_class, UNICODE_STRING.mb_chars
end
end
end