From dd491b24ff28f637b1c8879002adb1acdf20a8ac Mon Sep 17 00:00:00 2001 From: Pat Allan Date: Tue, 20 Jun 2017 19:45:46 +1000 Subject: Make ActionMailer frozen string literal friendly. --- actionpack/lib/action_dispatch/http/response.rb | 2 +- actionpack/lib/action_dispatch/journey/router/utils.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/lib') 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 } -- cgit v1.2.3