summaryrefslogtreecommitdiff
path: root/spec/ruby/library/socket/basicsocket/sendmsg_nonblock_spec.rb
diff options
context:
space:
mode:
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