summaryrefslogtreecommitdiff
path: root/spec/ruby/library/socket/basicsocket/sendmsg_nonblock_spec.rb
diff options
context:
space:
mode:
authorBenoit Daloze <[email protected]>2019-06-27 21:02:36 +0200
committerBenoit Daloze <[email protected]>2019-06-27 21:02:36 +0200
commitd80e44deec77678fe2d72f94c17b2409b3e794d5 (patch)
tree612bf2313550e0982dda452f48492cc069e1c21a /spec/ruby/library/socket/basicsocket/sendmsg_nonblock_spec.rb
parentc940397116c5aef76b1c0d05561c11d43ef596a7 (diff)
Update to ruby/spec@8d74d49
Diffstat (limited to 'spec/ruby/library/socket/basicsocket/sendmsg_nonblock_spec.rb')
-rw-r--r--spec/ruby/library/socket/basicsocket/sendmsg_nonblock_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/ruby/library/socket/basicsocket/sendmsg_nonblock_spec.rb b/spec/ruby/library/socket/basicsocket/sendmsg_nonblock_spec.rb
index de5e2aa749..000971f6af 100644
--- a/spec/ruby/library/socket/basicsocket/sendmsg_nonblock_spec.rb
+++ b/spec/ruby/library/socket/basicsocket/sendmsg_nonblock_spec.rb
@@ -98,6 +98,15 @@ describe 'BasicSocket#sendmsg_nonblock' do
10.times { @client.sendmsg_nonblock('hello' * 1_000_000) }
}.should raise_error(IO::WaitWritable)
end
+
+ it 'returns :wait_writable when the underlying buffer is full with exception: false' do
+ ret = nil
+ 10.times {
+ ret = @client.sendmsg_nonblock('hello' * 1_000_000, exception: false)
+ break unless ret.is_a?(Integer)
+ }
+ ret.should == :wait_writable
+ end
end
end
end