From: Roger Pack Date: 2008-11-12T05:21:23+09:00 Subject: [ruby-core:19845] [Bug #743] Socket.gethostbyname returns odd values Bug #743: Socket.gethostbyname returns odd values http://redmine.ruby-lang.org/issues/show/743 Author: Roger Pack Status: Open, Priority: Normal from http://rubyforge.org/tracker/index.php?func=detail&aid=14979&group_id=426&atid=1698 ruby -rsocket -e 'p Socket.gethostbyname("127.0.0.1")' should return something like ["localhost", [], 2, "\177\000\000\001"] (it does with ruby 1.8.2 (2005-04-11) and also on windows) However, on linux with 1.9/1.8.7 it returns ["127.0.0.1", [], 2, "\x7F\x00\x00\x01"] Socket.gethostbyname("127.0.0.1")' ["127.0.0.1", [], 2, "\177\000\000\001"] respectively, which I think is unexpected. Thanks! from ---------------------------------------- http://redmine.ruby-lang.org