diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-06-02 02:18:44 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-06-02 02:18:44 +0000 |
commit | ae042f21fb695fc80eb19273fa542e8dad85f19f (patch) | |
tree | 6b64fce04b19a8e1531f60a7d3d47c8a9fc97a20 /test/socket/test_socket.rb | |
parent | 21f2c194bbf781d9228584f3e93f4a93b33f5632 (diff) | |
download | ruby-ae042f21fb695fc80eb19273fa542e8dad85f19f.tar.gz |
use assert_raise
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/socket/test_socket.rb')
-rw-r--r-- | test/socket/test_socket.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/socket/test_socket.rb b/test/socket/test_socket.rb index 1db0ea251d..3682338b48 100644 --- a/test/socket/test_socket.rb +++ b/test/socket/test_socket.rb @@ -78,7 +78,7 @@ class TestSocket < Test::Unit::TestCase port, = Socket.unpack_sockaddr_in(addr) Socket.open(Socket::AF_INET, Socket::SOCK_STREAM, 0) {|s| - e = assert_raises(Errno::EADDRINUSE) do + e = assert_raise(Errno::EADDRINUSE) do s.bind(Socket.sockaddr_in(port, "127.0.0.1")) end @@ -556,7 +556,7 @@ class TestSocket < Test::Unit::TestCase # some platforms may not timeout when the listener queue overflows, # but we know Linux does with the default listen backlog of SOMAXCONN for # TCPServer. - assert_raises(Errno::ETIMEDOUT) do + assert_raise(Errno::ETIMEDOUT) do (Socket::SOMAXCONN*2).times do |i| sock = Socket.tcp(host, port, :connect_timeout => 0) assert_equal sock, IO.select(nil, [ sock ])[1][0], |