Skip to content

Commit c503335

Browse files
committed
This spec raises EINVAL on Windows and not ENOTCONN
1 parent 3ea7a46 commit c503335

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

library/socket/basicsocket/recv_nonblock_spec.rb

+6-2
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,12 @@
7979
end
8080

8181
it "raises Errno::ENOTCONN" do
82-
-> { @server.recv_nonblock(1) }.should raise_error(Errno::ENOTCONN)
83-
-> { @server.recv_nonblock(1, exception: false) }.should raise_error(Errno::ENOTCONN)
82+
-> { @server.recv_nonblock(1) }.should raise_error { |e|
83+
[Errno::ENOTCONN, Errno::EINVAL].should.include?(e.class)
84+
}
85+
-> { @server.recv_nonblock(1, exception: false) }.should raise_error { |e|
86+
[Errno::ENOTCONN, Errno::EINVAL].should.include?(e.class)
87+
}
8488
end
8589
end
8690
end

0 commit comments

Comments
 (0)