Skip to content

Commit

Permalink
Proxy Streaming#empty? to @input.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Apr 3, 2024
1 parent d92266f commit b438ae9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/protocol/rack/body/streaming.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ def read
end
end

def empty?
if @input
@input.empty?
else
true
end
end

# Invokes the block in a fiber which yields chunks when they are available.
def read
@output ||= Output.new(@input, @block)
Expand Down

0 comments on commit b438ae9

Please sign in to comment.