From 5a66c855bc2e56954f1250360f6ffb91a76cf539 Mon Sep 17 00:00:00 2001 From: Cillian O'Ruanaidh Date: Fri, 30 Oct 2020 10:09:53 +0000 Subject: [PATCH] Add :frozen_string_literal magic comment and underscore prefix to unused block argument for Rubocop --- lib/action_dispatch/request.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/action_dispatch/request.rb b/lib/action_dispatch/request.rb index 681d0890bc..a0f26ecd01 100644 --- a/lib/action_dispatch/request.rb +++ b/lib/action_dispatch/request.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # This patch fixes the Rails issue where ActionDispatch::Request#deep_munge was converting empty # array paramters into nils, see https://github.com/rails/rails/issues/13420 # @@ -28,7 +30,7 @@ module ActionDispatch class Request def deep_munge(hash) - hash.each do |k, v| + hash.each do |_k, v| case v when Array v.grep(Hash) { |x| deep_munge(x) }