about summary refs log tree commit homepage
path: root/lib/unicorn/tee_input.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/unicorn/tee_input.rb')
-rw-r--r--lib/unicorn/tee_input.rb5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/unicorn/tee_input.rb b/lib/unicorn/tee_input.rb
index 74d9df6..0e937ff 100644
--- a/lib/unicorn/tee_input.rb
+++ b/lib/unicorn/tee_input.rb
@@ -81,10 +81,7 @@ class Unicorn::TeeInput < Unicorn::StreamInput
   # This takes zero arguments for strict Rack::Lint compatibility,
   # unlike IO#gets.
   def gets
-    @socket or return @tmp.gets
-    rv = super
-    # the $/.nil? case is implemented using read, so don't tee() again
-    $/.nil? ? rv : tee(rv)
+    @socket ? tee(super) : @tmp.gets
   end
 
   # :call-seq: