aboutsummaryrefslogtreecommitdiffstats
path: root/test/socket/test_tcp.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/socket/test_tcp.rb')
-rw-r--r--test/socket/test_tcp.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/socket/test_tcp.rb b/test/socket/test_tcp.rb
index 15c79b7519..a9e2a417a5 100644
--- a/test/socket/test_tcp.rb
+++ b/test/socket/test_tcp.rb
@@ -69,6 +69,12 @@ class TestSocket_TCPSocket < Test::Unit::TestCase
end
end
+ def test_initialize_connect_timeout
+ assert_raise(Errno::ETIMEDOUT) do
+ TCPSocket.new("192.0.2.1", 80, connect_timeout: 0)
+ end
+ end
+
def test_recvfrom
TCPServer.open("localhost", 0) {|svr|
th = Thread.new {