lib/httpx/buffer.rb in httpx-0.5.0 vs lib/httpx/buffer.rb in httpx-0.5.1

- old
+ new

@@ -14,12 +14,10 @@ def_delegator :@buffer, :empty? def_delegator :@buffer, :bytesize - def_delegator :@buffer, :slice! - def_delegator :@buffer, :clear def_delegator :@buffer, :replace attr_reader :limit @@ -29,8 +27,12 @@ @limit = limit end def full? @buffer.bytesize >= @limit + end + + def shift!(fin) + @buffer = @buffer.byteslice(fin..-1) end end end