From acbc0e0467e7d4b7075c7b2df6404d807ba7d06c Mon Sep 17 00:00:00 2001 From: Samuel Cochran Date: Thu, 29 Nov 2018 09:14:24 +1100 Subject: Avoid extra array allocations --- actionpack/lib/action_dispatch/middleware/debug_exceptions.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb b/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb index 61e7e73a68..7669767ae3 100644 --- a/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb +++ b/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb @@ -183,9 +183,9 @@ module ActionDispatch message = [] message << " " message << "#{exception.class} (#{exception.message}):" - message += exception.annoted_source_code if exception.respond_to?(:annoted_source_code) + message.concat(exception.annoted_source_code) if exception.respond_to?(:annoted_source_code) message << " " - message += trace + message.concat(trace) log_array(logger, message) end -- cgit v1.2.3