summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/ruby/library/socket/basicsocket/send_spec.rb12
1 files changed, 3 insertions, 9 deletions
diff --git a/spec/ruby/library/socket/basicsocket/send_spec.rb b/spec/ruby/library/socket/basicsocket/send_spec.rb
index a405916bfc..c4845fc09e 100644
--- a/spec/ruby/library/socket/basicsocket/send_spec.rb
+++ b/spec/ruby/library/socket/basicsocket/send_spec.rb
@@ -196,17 +196,11 @@ describe 'BasicSocket#send' do
describe 'using the MSG_OOB flag' do
it 'sends an out-of-band message' do
- @server.setsockopt(:SOCKET, :OOBINLINE, true)
-
- @client.send('a', Socket::MSG_OOB).should == 1
-
- platform_is :freebsd do # recv hangs otherwise
- @client.close
- end
-
socket, _ = @server.accept
+ socket.setsockopt(:SOCKET, :OOBINLINE, true)
+ @client.send('a', Socket::MSG_OOB).should == 1
begin
- socket.recv(1, Socket::MSG_OOB).should == 'a'
+ socket.recv(10).should == 'a'
ensure
socket.close
end