aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorPat Allan <pat@freelancing-gods.com>2017-06-20 18:35:44 +1000
committerPat Allan <pat@freelancing-gods.com>2017-06-20 18:35:44 +1000
commit4ff30d9bb6d5d591fbb3952112d721c995059302 (patch)
treeb5f7e2b6a690bceecc0fce3990247b08dda1a268 /actionview
parent036bdee4d5bdad3b3fa1d57ca292214afe746a09 (diff)
downloadrails-4ff30d9bb6d5d591fbb3952112d721c995059302.tar.gz
rails-4ff30d9bb6d5d591fbb3952112d721c995059302.tar.bz2
rails-4ff30d9bb6d5d591fbb3952112d721c995059302.zip
Make ActiveModel frozen string literal friendly.
Includes two external changes because they're referenced within the ActiveModel test suite.
Diffstat (limited to 'actionview')
-rw-r--r--actionview/lib/action_view/helpers/javascript_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionview/lib/action_view/helpers/javascript_helper.rb b/actionview/lib/action_view/helpers/javascript_helper.rb
index 22e1e74ad6..6ba70ec081 100644
--- a/actionview/lib/action_view/helpers/javascript_helper.rb
+++ b/actionview/lib/action_view/helpers/javascript_helper.rb
@@ -13,8 +13,8 @@ module ActionView
"'" => "\\'"
}
- JS_ESCAPE_MAP["\342\200\250".force_encoding(Encoding::UTF_8).encode!] = "&#x2028;"
- JS_ESCAPE_MAP["\342\200\251".force_encoding(Encoding::UTF_8).encode!] = "&#x2029;"
+ JS_ESCAPE_MAP["\342\200\250".dup.force_encoding(Encoding::UTF_8).encode!] = "&#x2028;"
+ JS_ESCAPE_MAP["\342\200\251".dup.force_encoding(Encoding::UTF_8).encode!] = "&#x2029;"
# Escapes carriage returns and single and double quotes for JavaScript segments.
#