diff options
author | Masaki Matsushita <glass.saga@gmail.com> | 2020-08-27 23:49:05 +0900 |
---|---|---|
committer | Masaki Matsushita <glass.saga@gmail.com> | 2020-08-28 01:01:51 +0900 |
commit | 9658a5a849d58c206074557e4f716ec0dffdfe59 (patch) | |
tree | 30f4877511bf293241dff75ae422c73e12f17f4e | |
parent | 5483bf8fa4bc62239341e7ff08f6e104258ca7a7 (diff) | |
download | ruby-9658a5a849d58c206074557e4f716ec0dffdfe59.tar.gz |
Show deprecation warning on TCPSocket.gethostbyname
-rw-r--r-- | ext/socket/tcpsocket.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/socket/tcpsocket.c b/ext/socket/tcpsocket.c index 29a3eda45f..f3fcee781d 100644 --- a/ext/socket/tcpsocket.c +++ b/ext/socket/tcpsocket.c @@ -59,6 +59,7 @@ tcp_sockaddr(struct sockaddr *addr, socklen_t len) static VALUE tcp_s_gethostbyname(VALUE obj, VALUE host) { + rb_warn("TCPSocket.gethostbyname is deprecated; use Addrinfo.getaddrinfo instead."); struct rb_addrinfo *res = rsock_addrinfo(host, Qnil, AF_UNSPEC, SOCK_STREAM, AI_CANONNAME); return rsock_make_hostent(host, res, tcp_sockaddr); |