From 5525d821344f6807af4e81d9fe572703f6e9ba9e Mon Sep 17 00:00:00 2001 From: akr Date: Thu, 2 Feb 2012 11:51:25 +0000 Subject: [PATCH] update doc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/socket/raddrinfo.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ext/socket/raddrinfo.c b/ext/socket/raddrinfo.c index 2229269212..a9a4535741 100644 --- a/ext/socket/raddrinfo.c +++ b/ext/socket/raddrinfo.c @@ -661,6 +661,7 @@ make_inspectname(VALUE node, VALUE service, struct addrinfo *res) VALUE inspectname = Qnil; if (res) { + /* drop redundant information which also shown in address:port part. */ char hbuf[NI_MAXHOST], pbuf[NI_MAXSERV]; int ret; ret = rb_getnameinfo(res->ai_addr, res->ai_addrlen, hbuf, @@ -1060,7 +1061,7 @@ inspect_sockaddr(VALUE addrinfo, VALUE ret) * * returns a string which shows addrinfo in human-readable form. * - * Addrinfo.tcp("localhost", 80).inspect #=> "#" + * Addrinfo.tcp("localhost", 80).inspect #=> "#" * Addrinfo.unix("/tmp/sock").inspect #=> "#" * */ @@ -1432,7 +1433,7 @@ addrinfo_to_sockaddr(VALUE self) * The canonical name is set by Addrinfo.getaddrinfo when AI_CANONNAME is specified. * * list = Addrinfo.getaddrinfo("www.ruby-lang.org", 80, :INET, :STREAM, nil, Socket::AI_CANONNAME) - * p list[0] #=> # + * p list[0] #=> # * p list[0].canonname #=> "carbon.ruby-lang.org" * */ @@ -1975,8 +1976,8 @@ addrinfo_unix_path(VALUE self) * because some port numbers, 512 for example, are ambiguous without socktype. * * Addrinfo.getaddrinfo("www.kame.net", 80, nil, :STREAM) - * #=> [#, - * # #] + * #=> [#, + * # #] * */ static VALUE