Add :frozen_string_literal magic comment and underscore prefix to unused block argument for Rubocop

This commit is contained in:
Cillian O'Ruanaidh
2020-10-30 10:09:53 +00:00
parent ea3c456d3b
commit 5a66c855bc

View File

@@ -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) }