Skip to content

Commit 055f71c

Browse files
committed
Reduce a String object allocation
1 parent 66386d3 commit 055f71c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

actionpack/lib/action_controller/log_subscriber.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ def process_action(event)
3333

3434
additions << "Allocations: #{event.allocations}"
3535

36-
message = +"Completed #{status} #{Rack::Utils::HTTP_STATUS_CODES[status]} in #{event.duration.round}ms"
37-
message << " (#{additions.join(" | ")})"
36+
message = +"Completed #{status} #{Rack::Utils::HTTP_STATUS_CODES[status]} in #{event.duration.round}ms" \
37+
" (#{additions.join(" | ")})"
3838
message << "\n\n" if defined?(Rails.env) && Rails.env.development?
3939

4040
message

0 commit comments

Comments
 (0)