From 2f1155794a6a1709f9e48b8115d6bd3531b2d814 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 27 Sep 2009 23:23:20 -0700 Subject: cgi_wrapper: use Array#concat instead of += Array#concat avoids an intermediate Array object from being allocated (yes, still supporting Rails <= 1.2.x apps...) --- lib/unicorn/cgi_wrapper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/unicorn/cgi_wrapper.rb b/lib/unicorn/cgi_wrapper.rb index 8c90e95..b6eeb33 100644 --- a/lib/unicorn/cgi_wrapper.rb +++ b/lib/unicorn/cgi_wrapper.rb @@ -66,7 +66,7 @@ class Unicorn::CGIWrapper < ::CGI # finalizes the response in a way Rack applications would expect def rack_response # @head[CONTENT_LENGTH] ||= @body.size - @headv[SET_COOKIE] += @output_cookies if @output_cookies + @headv[SET_COOKIE].concat(@output_cookies) if @output_cookies @headv.each_pair do |key,value| @head[key] ||= value.join("\n") unless value.empty? end -- cgit v1.2.3-24-ge0c7