diff options
author | Jeremy Daer <jeremydaer@gmail.com> | 2018-10-12 07:36:15 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-12 07:36:15 -0700 |
commit | 619b2ae6a489c627096a36aa63fdff546ce766d1 (patch) | |
tree | 2910c6b1097186759aa96e9487795eee17472cc1 /activesupport/test | |
parent | 29b1984a05db7c556bde2a7a79a9062fbdf1a4da (diff) | |
parent | 16e3b65674e3a41afe0415c88c75667e72fd0de9 (diff) | |
download | rails-619b2ae6a489c627096a36aa63fdff546ce766d1.tar.gz rails-619b2ae6a489c627096a36aa63fdff546ce766d1.tar.bz2 rails-619b2ae6a489c627096a36aa63fdff546ce766d1.zip |
Merge pull request #34123 from frodsan/deprecate_unicode_string_wrappers
Deprecate Unicode#downcase/upcase/swapcase.
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/multibyte_chars_test.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/activesupport/test/multibyte_chars_test.rb b/activesupport/test/multibyte_chars_test.rb index 11c4822748..3585b1ed32 100644 --- a/activesupport/test/multibyte_chars_test.rb +++ b/activesupport/test/multibyte_chars_test.rb @@ -477,7 +477,7 @@ class MultibyteCharsUTF8BehaviourTest < ActiveSupport::TestCase def test_method_works_for_proxyed_methods assert_equal "ll", "hello".mb_chars.method(:slice).call(2..3) # Defined on Chars - chars = "hello".mb_chars + chars = +"hello".mb_chars assert_equal "Hello", chars.method(:capitalize!).call # Defined on Chars assert_equal "Hello", chars assert_equal "jello", "hello".mb_chars.method(:gsub).call(/h/, "j") # Defined on String @@ -719,6 +719,12 @@ class MultibyteCharsExtrasTest < ActiveSupport::TestCase assert_equal BYTE_STRING.dup.mb_chars.class, ActiveSupport::Multibyte::Chars end + def test_unicode_deprecations + assert_deprecated { ActiveSupport::Multibyte::Unicode.downcase("") } + assert_deprecated { ActiveSupport::Multibyte::Unicode.upcase("") } + assert_deprecated { ActiveSupport::Multibyte::Unicode.swapcase("") } + end + private def string_from_classes(classes) |