Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #4043 from cqpx/master

don't encode an UTF-8 encoded template
  • Loading branch information...
commit fde9af06785cb871ad040a34b04380b28d9657c7 2 parents 23f6cab + 10304a2
@josevalim josevalim authored
View
2  actionpack/lib/action_view/template/error.rb
@@ -94,7 +94,7 @@ def source_extract(indentation = 0)
"#{indent}#{line_counter}: #{line}\n"
end
- extract.encode! if extract.respond_to?(:encode!)
+ extract.force_encoding("UTF-8") if extract.respond_to?(:encode!)
extract
end
View
3  railties/test/application/middleware/exceptions_test.rb
@@ -99,7 +99,7 @@ def index
app_file 'app/views/foo/index.html.erb', <<-ERB
<% raise 'boooom' %>
-
+測試テスト시험
ERB
app_file 'config/routes.rb', <<-RUBY
@@ -110,6 +110,7 @@ def index
post '/foo', :utf8 => ''
assert_match(/boooom/, last_response.body)
+ assert_match(/測試テスト시험/, last_response.body)
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.