Skip to content

Commit

Permalink
This spec raises EINVAL on Windows and not ENOTCONN
Browse files Browse the repository at this point in the history
  • Loading branch information
eregon committed Jul 29, 2021
1 parent 3ea7a46 commit c503335
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions library/socket/basicsocket/recv_nonblock_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,12 @@
end

it "raises Errno::ENOTCONN" do
-> { @server.recv_nonblock(1) }.should raise_error(Errno::ENOTCONN)
-> { @server.recv_nonblock(1, exception: false) }.should raise_error(Errno::ENOTCONN)
-> { @server.recv_nonblock(1) }.should raise_error { |e|
[Errno::ENOTCONN, Errno::EINVAL].should.include?(e.class)
}
-> { @server.recv_nonblock(1, exception: false) }.should raise_error { |e|
[Errno::ENOTCONN, Errno::EINVAL].should.include?(e.class)
}
end
end
end
Expand Down

0 comments on commit c503335

Please sign in to comment.