lib/httpx/io/tcp.rb in httpx-0.5.0 vs lib/httpx/io/tcp.rb in httpx-0.5.1
- old
+ new
@@ -85,11 +85,11 @@
nil
end
def write(buffer)
siz = @io.write_nonblock(buffer)
- buffer.slice!(0, siz)
+ buffer.shift!(siz)
siz
rescue ::IO::WaitWritable
0
rescue EOFError
nil
@@ -106,10 +106,10 @@
def write(buffer)
siz = @io.write_nonblock(buffer, exception: false)
return 0 if siz == :wait_writable
return if siz.nil?
- buffer.slice!(0, siz)
+ buffer.shift!(siz)
siz
end
end
def close