lib/rack/body_proxy.rb in rack-1.3.3 vs lib/rack/body_proxy.rb in rack-1.3.4

- old
+ new

@@ -7,16 +7,13 @@ def respond_to?(*args) super or @body.respond_to?(*args) end def close - raise IOError, "closed stream" if @closed - begin - @body.close if @body.respond_to? :close - ensure - @block.call - @closed = true - end + return if @closed + @closed = true + @body.close if @body.respond_to? :close + @block.call end def closed? @closed end