diff options
author | Pablo Herrero <pablodherrero@gmail.com> | 2014-11-01 20:16:03 -0300 |
---|---|---|
committer | Pablo Herrero <pablodherrero@gmail.com> | 2014-11-01 20:23:29 -0300 |
commit | 861b70e92f4a1fc0e465ffcf2ee62680519c8f6f (patch) | |
tree | cc5ce3c824b091cc88fb2c9c1f8557905108f265 /actionview/lib/action_view/template | |
parent | daab7e59a6196fa2bbab17dc4a88b095a211fc96 (diff) | |
download | rails-861b70e92f4a1fc0e465ffcf2ee62680519c8f6f.tar.gz rails-861b70e92f4a1fc0e465ffcf2ee62680519c8f6f.tar.bz2 rails-861b70e92f4a1fc0e465ffcf2ee62680519c8f6f.zip |
Call gsub with a Regexp instead of a String for better performance
Diffstat (limited to 'actionview/lib/action_view/template')
-rw-r--r-- | actionview/lib/action_view/template/handlers/raw.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionview/lib/action_view/template/handlers/raw.rb b/actionview/lib/action_view/template/handlers/raw.rb index 0c0d1fffcb..397c86014a 100644 --- a/actionview/lib/action_view/template/handlers/raw.rb +++ b/actionview/lib/action_view/template/handlers/raw.rb @@ -2,7 +2,7 @@ module ActionView module Template::Handlers class Raw def call(template) - escaped = template.source.gsub(':', '\:') + escaped = template.source.gsub(/:/, '\:') '%q:' + escaped + ':;' end |