aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/javascript_helper.rb
diff options
context:
space:
mode:
authorSergey Nartimov <just.lest@gmail.com>2011-12-24 15:57:54 +0300
committerSergey Nartimov <just.lest@gmail.com>2011-12-24 15:57:54 +0300
commit5ca86ac8f924b333a5a01a47cc07cbcf39c16e80 (patch)
treeda7a9a4d9cd8ad05648bde5d283715d5feea4d81 /actionpack/lib/action_view/helpers/javascript_helper.rb
parenta5fa310f406e299a1ac54d1a227bde93b7ce282b (diff)
downloadrails-5ca86ac8f924b333a5a01a47cc07cbcf39c16e80.tar.gz
rails-5ca86ac8f924b333a5a01a47cc07cbcf39c16e80.tar.bz2
rails-5ca86ac8f924b333a5a01a47cc07cbcf39c16e80.zip
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.
#