diff options
author | Francesco Rodriguez <lrodriguezsanc@gmail.com> | 2012-12-01 15:41:06 -0500 |
---|---|---|
committer | Francesco Rodriguez <lrodriguezsanc@gmail.com> | 2012-12-01 15:41:06 -0500 |
commit | 86dd2f32764ef3f141d9b24a47725b004fd4ac71 (patch) | |
tree | 8dce9840adce9123b28fc511e1c003ce3f091fc9 | |
parent | 583cc11dd75676665e1d106541979d94864ee663 (diff) | |
download | rails-86dd2f32764ef3f141d9b24a47725b004fd4ac71.tar.gz rails-86dd2f32764ef3f141d9b24a47725b004fd4ac71.tar.bz2 rails-86dd2f32764ef3f141d9b24a47725b004fd4ac71.zip |
ensure original encoding doesnt change
-rw-r--r-- | activesupport/test/multibyte_chars_test.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/activesupport/test/multibyte_chars_test.rb b/activesupport/test/multibyte_chars_test.rb index 0088a06c34..2bf73291a2 100644 --- a/activesupport/test/multibyte_chars_test.rb +++ b/activesupport/test/multibyte_chars_test.rb @@ -47,7 +47,10 @@ class MultibyteCharsTest < ActiveSupport::TestCase end def test_methods_are_forwarded_to_wrapped_string_for_byte_strings + original_encoding = BYTE_STRING.encoding assert_equal BYTE_STRING.length, BYTE_STRING.mb_chars.length + ensure + BYTE_STRING.force_encoding(original_encoding) end def test_forwarded_method_with_non_string_result_should_be_returned_vertabim |