This spec raises EINVAL on Windows and not ENOTCONN · ruby/spec@c503335 (original) (raw)
File tree
1 file changed
lines changed
- library/socket/basicsocket
1 file changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -79,8 +79,12 @@ | ||
79 | 79 | end |
80 | 80 | |
81 | 81 | 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 | +} | |
84 | 88 | end |
85 | 89 | end |
86 | 90 | end |