From 9d60e1931021faa52bee60e34913c656317f2698 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 27 Feb 2010 19:04:40 -0800 Subject: ev_core: avoid needless String#dup Just create an empty string instead and let Unicorn::HttpParser allocate it internally to whatever size is needed. --- lib/rainbows/ev_core.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/rainbows/ev_core.rb') diff --git a/lib/rainbows/ev_core.rb b/lib/rainbows/ev_core.rb index a9c5bfc..3d02b8a 100644 --- a/lib/rainbows/ev_core.rb +++ b/lib/rainbows/ev_core.rb @@ -50,7 +50,7 @@ module Rainbows @env.delete(HTTP_EXPECT) end @input = len && len <= MAX_BODY ? StringIO.new("") : Util.tmpio - @hp.filter_body(@buf2 = @buf.dup, @buf) + @hp.filter_body(@buf2 = "", @buf) @input << @buf2 on_read("") end -- cgit v1.2.3-24-ge0c7