Skip to content

Commit b0b6917

Browse files
committed
Regression spec for #2967.
1 parent f156123 commit b0b6917

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
require 'socket'
2+
require 'io/nonblock'
3+
4+
describe 'Writing zero bytes to a nonblocking socket' do
5+
it 'returns 0 bytes and does not raise EAGAIN' do
6+
begin
7+
s = TCPSocket.new('google.com', 80)
8+
s.nonblock
9+
expect(s.syswrite('')).to eq 0
10+
ensure
11+
s.close
12+
end
13+
end
14+
end

0 commit comments

Comments
 (0)