From c0e2cfdc3fd476e229ede5cda59dea6374a730e7 Mon Sep 17 00:00:00 2001 From: Kir Shatrov Date: Mon, 24 Jul 2017 23:38:04 +0300 Subject: Make actionpack frozen string friendly --- actionpack/lib/action_controller/metal/http_authentication.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'actionpack/lib/action_controller') diff --git a/actionpack/lib/action_controller/metal/http_authentication.rb b/actionpack/lib/action_controller/metal/http_authentication.rb index d8bc895265..08d9b094f3 100644 --- a/actionpack/lib/action_controller/metal/http_authentication.rb +++ b/actionpack/lib/action_controller/metal/http_authentication.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "base64" require "active_support/security_utils" @@ -475,7 +477,7 @@ module ActionController # This removes the " characters wrapping the value. def rewrite_param_values(array_params) - array_params.each { |param| (param[1] || "").gsub! %r/^"|"$/, "" } + array_params.each { |param| (param[1] || "".dup).gsub! %r/^"|"$/, "" } end # This method takes an authorization body and splits up the key-value -- cgit v1.2.3