Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix pattern to match various magic comment formats

  • Loading branch information...
commit 4082001331e8d405e534a47eb8868ca6d9c228c2 1 parent 70034d8
Akira Matsuda amatsuda authored jeremy committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  actionpack/lib/action_view/template_handlers/erb.rb
2  actionpack/lib/action_view/template_handlers/erb.rb
View
@@ -11,7 +11,7 @@ class ERB < TemplateHandler
self.erb_trim_mode = '-'
def compile(template)
- magic = $1 if template.source =~ /\A(<%#.*coding:\s*(\S+)\s*-?%>)/
+ magic = $1 if template.source =~ /\A(<%#.*coding[:=]\s*(\S+)\s*-?%>)/
erb = "#{magic}<% __in_erb_template=true %>#{template.source}"
::ERB.new(erb, nil, erb_trim_mode, '@output_buffer').src
end
Please sign in to comment.
Something went wrong with that request. Please try again.