aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
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 /actionpack
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 'actionpack')
-rw-r--r--actionpack/lib/action_dispatch/journey/router/utils.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/journey/router/utils.rb b/actionpack/lib/action_dispatch/journey/router/utils.rb
index 6d400f3364..59c6df88ea 100644
--- a/actionpack/lib/action_dispatch/journey/router/utils.rb
+++ b/actionpack/lib/action_dispatch/journey/router/utils.rb
@@ -29,7 +29,7 @@ module ActionDispatch
ENCODE = "%%%02X".freeze
US_ASCII = Encoding::US_ASCII
UTF_8 = Encoding::UTF_8
- EMPTY = "".force_encoding(US_ASCII).freeze
+ EMPTY = "".dup.force_encoding(US_ASCII).freeze
DEC2HEX = (0..255).to_a.map { |i| ENCODE % i }.map { |s| s.force_encoding(US_ASCII) }
ALPHA = "a-zA-Z".freeze