aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/template/handlers/erb.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_view/template/handlers/erb.rb')
-rw-r--r--actionpack/lib/action_view/template/handlers/erb.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/actionpack/lib/action_view/template/handlers/erb.rb b/actionpack/lib/action_view/template/handlers/erb.rb
index 95f11d6490..d773df7d29 100644
--- a/actionpack/lib/action_view/template/handlers/erb.rb
+++ b/actionpack/lib/action_view/template/handlers/erb.rb
@@ -16,11 +16,7 @@ module ActionView
self.default_format = Mime::HTML
def compile(template)
- src = ::ERB.new("<% __in_erb_template=true %>#{template.source}", nil, erb_trim_mode, '@output_buffer').src
-
- # Ruby 1.9 prepends an encoding to the source. However this is
- # useless because you can only set an encoding on the first line
- RUBY_VERSION >= '1.9' ? src.sub(/\A#coding:.*\n/, '') : src
+ ::ERB.new("<% __in_erb_template=true %>#{template.source}", nil, erb_trim_mode, '@output_buffer').src
end
end
end