From 4ff30d9bb6d5d591fbb3952112d721c995059302 Mon Sep 17 00:00:00 2001 From: Pat Allan Date: Tue, 20 Jun 2017 18:35:44 +1000 Subject: Make ActiveModel frozen string literal friendly. Includes two external changes because they're referenced within the ActiveModel test suite. --- actionpack/lib/action_dispatch/journey/router/utils.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib') 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 -- cgit v1.2.3