lib/httpx/buffer.rb in httpx-0.22.5 vs lib/httpx/buffer.rb in httpx-0.23.0
- old
+ new
@@ -29,9 +29,13 @@
def full?
@buffer.bytesize >= @limit
end
+ def capacity
+ @limit - @buffer.bytesize
+ end
+
def shift!(fin)
@buffer = @buffer.byteslice(fin..-1) || "".b
end
end
end