diff options
author | Pat Allan <pat@freelancing-gods.com> | 2017-06-20 22:20:04 +1000 |
---|---|---|
committer | Pat Allan <pat@freelancing-gods.com> | 2017-06-20 22:20:04 +1000 |
commit | 3d453b409d037a056d0bcd636a2e020cc7cef4a8 (patch) | |
tree | 2b1bc8943f5b064fb74e2d7022a882547c82c21f /actionpack/lib | |
parent | dd491b24ff28f637b1c8879002adb1acdf20a8ac (diff) | |
download | rails-3d453b409d037a056d0bcd636a2e020cc7cef4a8.tar.gz rails-3d453b409d037a056d0bcd636a2e020cc7cef4a8.tar.bz2 rails-3d453b409d037a056d0bcd636a2e020cc7cef4a8.zip |
Make ActionView frozen string literal friendly.
Plus a couple of related ActionPack patches.
Diffstat (limited to 'actionpack/lib')
3 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/log_subscriber.rb b/actionpack/lib/action_controller/log_subscriber.rb index d00fcbcd13..5d75393897 100644 --- a/actionpack/lib/action_controller/log_subscriber.rb +++ b/actionpack/lib/action_controller/log_subscriber.rb @@ -24,7 +24,7 @@ module ActionController exception_class_name = payload[:exception].first status = ActionDispatch::ExceptionWrapper.status_code_for_exception(exception_class_name) end - message = "Completed #{status} #{Rack::Utils::HTTP_STATUS_CODES[status]} in #{event.duration.round}ms" + message = "Completed #{status} #{Rack::Utils::HTTP_STATUS_CODES[status]} in #{event.duration.round}ms".dup message << " (#{additions.join(" | ".freeze)})" unless additions.empty? message << "\n\n" if defined?(Rails.env) && Rails.env.development? diff --git a/actionpack/lib/action_dispatch/journey/router/utils.rb b/actionpack/lib/action_dispatch/journey/router/utils.rb index b3896faf56..1ac86d10d6 100644 --- a/actionpack/lib/action_dispatch/journey/router/utils.rb +++ b/actionpack/lib/action_dispatch/journey/router/utils.rb @@ -18,7 +18,7 @@ module ActionDispatch path.squeeze!("/".freeze) path.sub!(%r{/+\Z}, "".freeze) path.gsub!(/(%[a-f0-9]{2})/) { $1.upcase } - path = "/" if path == "".freeze + path = "/".dup if path == "".freeze path.force_encoding(encoding) path end diff --git a/actionpack/lib/action_dispatch/testing/assertions/response.rb b/actionpack/lib/action_dispatch/testing/assertions/response.rb index 1baf979ac9..749f2eab57 100644 --- a/actionpack/lib/action_dispatch/testing/assertions/response.rb +++ b/actionpack/lib/action_dispatch/testing/assertions/response.rb @@ -79,7 +79,7 @@ module ActionDispatch def generate_response_message(expected, actual = @response.response_code) "Expected response to be a <#{code_with_name(expected)}>,"\ " but was a <#{code_with_name(actual)}>" - .concat(location_if_redirected).concat(response_body_if_short) + .dup.concat(location_if_redirected).concat(response_body_if_short) end def response_body_if_short |