[前][次][番号順一覧][スレッド一覧]

ruby-changes:48166

From: akr <ko1@a...>
Date: Sat, 21 Oct 2017 23:21:56 +0900 (JST)
Subject: [ruby-changes:48166] akr:r60280 (trunk): Describe recommended-methods.

akr	2017-10-21 23:21:52 +0900 (Sat, 21 Oct 2017)

  New Revision: 60280

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60280

  Log:
    Describe recommended-methods.
    
    Addrinfo.getaddrinfo is recommended instead of
    Socket.gethostbyname.
    
    Addrinfo#getnameinfo is recommended instead of
    Socket.gethostbyaddr.

  Modified files:
    trunk/ext/socket/socket.c
Index: ext/socket/socket.c
===================================================================
--- ext/socket/socket.c	(revision 60279)
+++ ext/socket/socket.c	(revision 60280)
@@ -983,6 +983,7 @@ sock_sockaddr(struct sockaddr *addr, soc https://github.com/ruby/ruby/blob/trunk/ext/socket/socket.c#L983
  * call-seq:
  *   Socket.gethostbyname(hostname) => [official_hostname, alias_hostnames, address_family, *address_list]
  *
+ * Use Addrinfo.getaddrinfo instead.
  * This method is deprecated since following reasons:
  *
  * - The 3rd element of result is the address family of the first address.
@@ -1010,6 +1011,7 @@ sock_s_gethostbyname(VALUE obj, VALUE ho https://github.com/ruby/ruby/blob/trunk/ext/socket/socket.c#L1011
  * call-seq:
  *   Socket.gethostbyaddr(address_string [, address_family]) => hostent
  *
+ * Use Addrinfo#getnameinfo instead.
  * This method is deprecated since following reasons:
  *
  * - Uncommon address representation:

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]