diff options
author | Akira Matsuda <ronnie@dio.jp> | 2009-07-01 16:25:33 -0700 |
---|---|---|
committer | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-07-01 16:26:15 -0700 |
commit | 92bff2ebf122252cf3ff64160bdfa9891fcff3f4 (patch) | |
tree | d4123888a7bab25fa18dcebf136bb99bfc839b26 /actionpack | |
parent | 49824e8ad64be17d6b8a0356bc30342aecc72216 (diff) | |
download | rails-92bff2ebf122252cf3ff64160bdfa9891fcff3f4.tar.gz rails-92bff2ebf122252cf3ff64160bdfa9891fcff3f4.tar.bz2 rails-92bff2ebf122252cf3ff64160bdfa9891fcff3f4.zip |
Fix pattern to match various magic comment formats
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_view/template/handlers/erb.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/template/handlers/erb.rb b/actionpack/lib/action_view/template/handlers/erb.rb index e3a7d96941..aab7baf442 100644 --- a/actionpack/lib/action_view/template/handlers/erb.rb +++ b/actionpack/lib/action_view/template/handlers/erb.rb @@ -17,7 +17,7 @@ module ActionView def compile(template) require 'erb' - 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 |