enabling coverage areas from recent rubies

This commit is contained in:
HoneyryderChuck 2020-01-11 13:22:31 +00:00
parent e4e04e9fe8
commit 2e7713b52a

View File

@ -76,8 +76,8 @@ module HTTPX
::IO::WaitReadable
end
# :nocov:
if RUBY_VERSION < "2.3"
# :nocov:
def read(size, buffer)
@io.read_nonblock(size, buffer)
buffer.bytesize
@ -96,6 +96,7 @@ module HTTPX
rescue EOFError
nil
end
# :nocov:
else
def read(size, buffer)
ret = @io.read_nonblock(size, buffer, exception: false)
@ -114,7 +115,6 @@ module HTTPX
siz
end
end
# :nocov:
def close
return if @keep_open || closed?