diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-11-12 10:59:14 +0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-11-12 11:00:22 +0800 |
commit | 855c02a9720a17854a2f1c715efbe502cdba54e2 (patch) | |
tree | 52968f53cf0225a3b717c20d815e8cd1b116923c /lib/unicorn/tee_input.rb | |
parent | 3b544fb2c0e4a1e14a7bcb752a8af9819b5aaeb2 (diff) | |
download | unicorn-855c02a9720a17854a2f1c715efbe502cdba54e2.tar.gz |
Avoid having specific knowledge of internals in TeeInput and instead move that to StreamInput when dealing with byte counts. This makes things easier for Rainbows! which will need to extends these classes.
Diffstat (limited to 'lib/unicorn/tee_input.rb')
-rw-r--r-- | lib/unicorn/tee_input.rb | 5 |
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: |