Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

don't encode an UTF-8 encoded template

  • Loading branch information...
commit 10304a228d2b31a52c3e2e0efd83190f4d1d5e28 1 parent 9d6e52b
Xu Pan 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.