Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

ensure original encoding doesnt change #8393

Merged
merged 1 commit into from

2 participants

@frodsan

No description provided.

@carlosantoniodasilva carlosantoniodasilva merged commit e1ce84b into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 1, 2012
  1. @frodsan
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 0 deletions.
  1. +3 −0  activesupport/test/multibyte_chars_test.rb
View
3  activesupport/test/multibyte_chars_test.rb
@@ -47,7 +47,10 @@ def test_forwarded_bang_method_calls_should_return_nil_when_result_is_nil
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
Something went wrong with that request. Please try again.