aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/javascript_helper.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-12-24 05:47:21 -0800
committerJosé Valim <jose.valim@gmail.com>2011-12-24 05:47:21 -0800
commitf5b9aefb574bf3cf1d3779606e54bd0a0a73d2aa (patch)
treeda7a9a4d9cd8ad05648bde5d283715d5feea4d81 /actionpack/lib/action_view/helpers/javascript_helper.rb
parenta5fa310f406e299a1ac54d1a227bde93b7ce282b (diff)
parent5ca86ac8f924b333a5a01a47cc07cbcf39c16e80 (diff)
downloadrails-f5b9aefb574bf3cf1d3779606e54bd0a0a73d2aa.tar.gz
rails-f5b9aefb574bf3cf1d3779606e54bd0a0a73d2aa.tar.bz2
rails-f5b9aefb574bf3cf1d3779606e54bd0a0a73d2aa.zip
Merge pull request #4160 from lest/deprecate-encoding-aware
deprecate String#encoding_aware? and remove its usage
Diffstat (limited to 'actionpack/lib/action_view/helpers/javascript_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/javascript_helper.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/actionpack/lib/action_view/helpers/javascript_helper.rb b/actionpack/lib/action_view/helpers/javascript_helper.rb
index 842f4c23a3..309923490c 100644
--- a/actionpack/lib/action_view/helpers/javascript_helper.rb
+++ b/actionpack/lib/action_view/helpers/javascript_helper.rb
@@ -14,11 +14,7 @@ module ActionView
"'" => "\\'"
}
- if "ruby".encoding_aware?
- JS_ESCAPE_MAP["\342\200\250".force_encoding('UTF-8').encode!] = '&#x2028;'
- else
- JS_ESCAPE_MAP["\342\200\250"] = '&#x2028;'
- end
+ JS_ESCAPE_MAP["\342\200\250".force_encoding('UTF-8').encode!] = '&#x2028;'
# Escapes carriage returns and single and double quotes for JavaScript segments.
#