From 44eb53f5a5f1ea2e5aee93d0caf995f42b3179f7 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 6 Feb 2011 01:42:31 +0000 Subject: kill some unnecessary &block usage We were needlessly allocating objects even when using yield. --- lib/rainbows/reverse_proxy/synchronous.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/rainbows/reverse_proxy/synchronous.rb') diff --git a/lib/rainbows/reverse_proxy/synchronous.rb b/lib/rainbows/reverse_proxy/synchronous.rb index b5911a9..bbb9ec5 100644 --- a/lib/rainbows/reverse_proxy/synchronous.rb +++ b/lib/rainbows/reverse_proxy/synchronous.rb @@ -3,7 +3,7 @@ module Rainbows::ReverseProxy::Synchronous UpstreamSocket = Rainbows::ReverseProxy::UpstreamSocket - def each_block(input, &block) + def each_block(input) buf = "" while input.read(16384, buf) yield buf -- cgit v1.2.3-24-ge0c7