Skip to content

Commit

Permalink
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
require 'socket'
require 'io/nonblock'

describe 'Writing zero bytes to a nonblocking socket' do
it 'returns 0 bytes and does not raise EAGAIN' do
begin
s = TCPSocket.new('google.com', 80)
s.nonblock
expect(s.syswrite('')).to eq 0
ensure
s.close
end
end
end

0 comments on commit b0b6917

Please sign in to comment.