diff --git a/ext/socket/raddrinfo.c b/ext/socket/raddrinfo.c index e85109e401..0f89e9c5b6 100644 --- a/ext/socket/raddrinfo.c +++ b/ext/socket/raddrinfo.c @@ -1398,13 +1398,15 @@ addrinfo_s_getaddrinfo(int argc, VALUE *argv, VALUE self) return addrinfo_list_new(node, service, family, socktype, protocol, flags); } - /* * call-seq: * AddrInfo.ip(host) => addrinfo * * returns an addrinfo object for IP address. * + * The port, socktype, protocol of the result is filled by zero. + * So, it is not appropriate to create a socket. + * * AddrInfo.ip("localhost") #=> # */ static VALUE