Skip to content
Browse files

only load converter if the encodings are different

  • Loading branch information...
1 parent 22a6079 commit c212a34e1d1e2a4bfb546a664958aba168892c49 @tenderlove tenderlove committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/test/template/template_test.rb
View
2 actionpack/test/template/template_test.rb
@@ -170,7 +170,7 @@ def test_error_when_template_isnt_valid_utf8
def with_external_encoding(encoding)
old = Encoding.default_external
- Encoding::Converter.new old, encoding
+ Encoding::Converter.new old, encoding if old != encoding
silence_warnings { Encoding.default_external = encoding }
yield
ensure

0 comments on commit c212a34

Please sign in to comment.
Something went wrong with that request. Please try again.