diff options
author | Benoit Daloze <[email protected]> | 2019-07-27 12:40:09 +0200 |
---|---|---|
committer | Benoit Daloze <[email protected]> | 2019-07-27 12:40:09 +0200 |
commit | 5c276e1cc91c5ab2a41fbf7827af2fed914a2bc0 (patch) | |
tree | 05b5c68c8b2a00224d4646ea3b26ce3877efaadd /spec/ruby/library/socket/tcpserver/new_spec.rb | |
parent | a06301b103371b0b7da8eaca26ba744961769f99 (diff) |
Update to ruby/spec@875a09e
Diffstat (limited to 'spec/ruby/library/socket/tcpserver/new_spec.rb')
-rw-r--r-- | spec/ruby/library/socket/tcpserver/new_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/library/socket/tcpserver/new_spec.rb b/spec/ruby/library/socket/tcpserver/new_spec.rb index 4717b95a2c..94e5744995 100644 --- a/spec/ruby/library/socket/tcpserver/new_spec.rb +++ b/spec/ruby/library/socket/tcpserver/new_spec.rb @@ -49,7 +49,7 @@ describe "TCPServer.new" do end it "coerces port to string, then determines port from that number or service name" do - lambda { TCPServer.new(SocketSpecs.hostname, Object.new) }.should raise_error(TypeError) + -> { TCPServer.new(SocketSpecs.hostname, Object.new) }.should raise_error(TypeError) port = Object.new port.should_receive(:to_str).and_return("0") @@ -63,7 +63,7 @@ describe "TCPServer.new" do end it "raises Errno::EADDRNOTAVAIL when the address is unknown" do - lambda { TCPServer.new("1.2.3.4", 0) }.should raise_error(Errno::EADDRNOTAVAIL) + -> { TCPServer.new("1.2.3.4", 0) }.should raise_error(Errno::EADDRNOTAVAIL) end # There is no way to make this fail-proof on all machines, because @@ -71,7 +71,7 @@ describe "TCPServer.new" do # traditionally invalidly named ones. quarantine! do it "raises a SocketError when the host is unknown" do - lambda { + -> { TCPServer.new("--notavalidname", 0) }.should raise_error(SocketError) end @@ -79,7 +79,7 @@ describe "TCPServer.new" do it "raises Errno::EADDRINUSE when address is already in use" do @server = TCPServer.new('127.0.0.1', 0) - lambda { + -> { @server = TCPServer.new('127.0.0.1', @server.addr[1]) }.should raise_error(Errno::EADDRINUSE) end |