diff options
author | Pat Allan <pat@freelancing-gods.com> | 2017-06-20 19:45:46 +1000 |
---|---|---|
committer | Pat Allan <pat@freelancing-gods.com> | 2017-06-20 19:45:46 +1000 |
commit | dd491b24ff28f637b1c8879002adb1acdf20a8ac (patch) | |
tree | d240379ea8a92ea60d6eefdd1b94e4187749db54 /actionpack/lib | |
parent | b86e313df53ada181850a057e254052f38014738 (diff) | |
download | rails-dd491b24ff28f637b1c8879002adb1acdf20a8ac.tar.gz rails-dd491b24ff28f637b1c8879002adb1acdf20a8ac.tar.bz2 rails-dd491b24ff28f637b1c8879002adb1acdf20a8ac.zip |
Make ActionMailer frozen string literal friendly.
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/http/response.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/journey/router/utils.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/http/response.rb b/actionpack/lib/action_dispatch/http/response.rb index 3c91677d55..4155c155da 100644 --- a/actionpack/lib/action_dispatch/http/response.rb +++ b/actionpack/lib/action_dispatch/http/response.rb @@ -103,7 +103,7 @@ module ActionDispatch # :nodoc: def body @str_body ||= begin - buf = "" + buf = "".dup each { |chunk| buf << chunk } buf end diff --git a/actionpack/lib/action_dispatch/journey/router/utils.rb b/actionpack/lib/action_dispatch/journey/router/utils.rb index 59c6df88ea..b3896faf56 100644 --- a/actionpack/lib/action_dispatch/journey/router/utils.rb +++ b/actionpack/lib/action_dispatch/journey/router/utils.rb @@ -14,7 +14,7 @@ module ActionDispatch # normalize_path("/%ab") # => "/%AB" def self.normalize_path(path) encoding = path.encoding - path = "/#{path}" + path = "/#{path}".dup path.squeeze!("/".freeze) path.sub!(%r{/+\Z}, "".freeze) path.gsub!(/(%[a-f0-9]{2})/) { $1.upcase } |