summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/socket/test_socket.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/socket/test_socket.rb b/test/socket/test_socket.rb
index 3b2ea51b94..f1ec927c4c 100644
--- a/test/socket/test_socket.rb
+++ b/test/socket/test_socket.rb
@@ -121,6 +121,15 @@ class TestSocket < Test::Unit::TestCase
}
end
+ def test_ip_address_list_include_localhost
+ begin
+ list = Socket.ip_address_list
+ rescue NotImplementedError
+ return
+ end
+ assert_includes list.map(&:ip_address), Addrinfo.tcp("localhost", 0).ip_address
+ end
+
def test_tcp
TCPServer.open(0) {|serv|
addr = serv.connect_address