1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/socket/socket.c (sock_s_getaddrinfo): use family_to_int.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2009-01-01 11:47:55 +00:00
parent 6e4149f04a
commit e485a566ed
3 changed files with 13 additions and 8 deletions

View file

@ -110,4 +110,9 @@ class TestSocket < Test::Unit::TestCase
assert_raise(ArgumentError) { Socket.unpack_sockaddr_un(addr) }
}
end
def test_getaddrinfo
# This should not send a DNS query because AF_UNIX.
assert_raise(SocketError) { Socket.getaddrinfo("www.kame.net", 80, "AF_UNIX") }
end
end if defined?(Socket)