From: Brian Candler Date: 2008-11-12T17:45:09+09:00 Subject: [ruby-core:19868] [Bug #743] Socket.gethostbyname returns odd values Issue #743 has been updated by Brian Candler. But: $ ruby19 -rsocket -e 'p Socket.gethostbyname("localhost")' ["localhost", [], 2, "\x7F\x00\x00\x01"] (ditto 1.8.6) If Ruby has been changed so that it doesn't do a reverse DNS lookup when given an IP address to gethostbyname, then I support this change. (1) It causes all sorts of problems and delays where reverse DNS isn't set up properly, e.g. with druby://x.x.x.x/ where x.x.x.x is an IP address. I have on many occasions had to do Socket.do_not_reverse_lookup = true just to allow this to work properly. (2) I found this annoying because I never asked for a reverse DNS lookup, and yet one was forced on me. (3) I found this surprising, because the stdlib gethostbyname() doesn't do a reverse lookup. ---------------------------------------- http://redmine.ruby-lang.org/issues/show/743 ---------------------------------------- http://redmine.ruby-lang.org