[ruby-cvs:67500] akr:r60319 (trunk): deprecate TCPSocket.gethostbyname.

akr at ruby-lang.org akr at ruby-lang.org
Sun Oct 22 08:19:47 JST 2017


akr	2017-10-22 08:19:47 +0900 (Sun, 22 Oct 2017)

  New Revision: 60319

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

  Log:
    deprecate TCPSocket.gethostbyname.
    
    TCPSocket.gethostbyname has problems similar to
    Socket.gethostbyname.
    
    An example of the problem which only the address family of
    the first address is returned:
    
    ```
    pp TCPSocket.gethostbyname("www.wide.ad.jp")
    #=> ["www.wide.ad.jp",
          [],
          10,
          "2001:200:dff:fff1:216:3eff:fe4b:651c",
          "203.178.137.58"]
    ```
    
    The address family of the first address, AF_INET6 (10), is
    returned but
    the address family of the second address, AF_INET, is not
    returned.

  Modified files:
    trunk/ext/socket/tcpsocket.c


More information about the ruby-cvs mailing list