From d4b667e819dbc2c6e248f4daba12e894e6cd24ee Mon Sep 17 00:00:00 2001 From: Eugene Kenny Date: Thu, 6 May 2021 12:33:38 +0100 Subject: [PATCH] Remove unnecessary array conversion in log_array This method is only ever called with an array since 0b2c49aa4dad73d2af098bbbd545c05ed2ace3cd. --- actionpack/lib/action_dispatch/middleware/debug_exceptions.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb b/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb index faa5df8fca..31bcb21b01 100644 --- a/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb +++ b/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb @@ -149,9 +149,7 @@ module ActionDispatch log_array(logger, message) end - def log_array(logger, array) - lines = Array(array) - + def log_array(logger, lines) return if lines.empty? if logger.formatter && logger.formatter.respond_to?(:tags_text)