Skip to content

Commit 744c178

Browse files
committed
Proxy Streaming#empty? to @input.
1 parent 3da00c0 commit 744c178

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

lib/protocol/rack/body/streaming.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@ def read
4141
end
4242
end
4343

44+
def empty?
45+
if @input
46+
@input.empty?
47+
else
48+
true
49+
end
50+
end
51+
4452
# Invokes the block in a fiber which yields chunks when they are available.
4553
def read
4654
@output ||= Output.new(@input, @block)

0 commit comments

Comments
 (0)