diff options
author | Akira Matsuda <ronnie@dio.jp> | 2013-01-28 15:23:31 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2013-01-28 15:23:31 +0900 |
commit | 59deaecc76be1b9dcdc3c4865375287560add1d1 (patch) | |
tree | ce769b5cee11c7dc76677316858e69a8a243dfeb /actionpack/lib/action_view/template/handlers | |
parent | 789df3be3eaad5861647f22b02d362fd36a40657 (diff) | |
download | rails-59deaecc76be1b9dcdc3c4865375287560add1d1.tar.gz rails-59deaecc76be1b9dcdc3c4865375287560add1d1.tar.bz2 rails-59deaecc76be1b9dcdc3c4865375287560add1d1.zip |
Use already defined Encoding constants rather than creating one-trip Strings
Diffstat (limited to 'actionpack/lib/action_view/template/handlers')
-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 afbbece90f..5aaafc15c1 100644 --- a/actionpack/lib/action_view/template/handlers/erb.rb +++ b/actionpack/lib/action_view/template/handlers/erb.rb @@ -81,7 +81,7 @@ module ActionView # wrong, we can still find an encoding tag # (<%# encoding %>) inside the String using a regular # expression - template_source = template.source.dup.force_encoding("BINARY") + template_source = template.source.dup.force_encoding(Encoding::ASCII_8BIT) erb = template_source.gsub(ENCODING_TAG, '') encoding = $2 |