1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

don't encode an UTF-8 encoded template

This commit is contained in:
Xu Pan 2011-12-20 12:33:34 +08:00
parent 9d6e52b55e
commit 10304a228d
2 changed files with 3 additions and 2 deletions

View file

@ -94,7 +94,7 @@ module ActionView
"#{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 file

@ -99,7 +99,7 @@ module ApplicationTests
app_file 'app/views/foo/index.html.erb', <<-ERB
<% raise 'boooom' %>
ERB
app_file 'config/routes.rb', <<-RUBY
@ -110,6 +110,7 @@ module ApplicationTests
post '/foo', :utf8 => '✓'
assert_match(/boooom/, last_response.body)
assert_match(/測試テスト시험/, last_response.body)
end
end
end