Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save yorickpeterse/353d54e2fdc6088bc1ea to your computer and use it in GitHub Desktop.

Select an option

Save yorickpeterse/353d54e2fdc6088bc1ea to your computer and use it in GitHub Desktop.
require 'socket'
Socket.gethostbyname('localhost') # => ["localhost.localdomain", ["localhost", "x1carbon", "localhost", "x1carbon"], 10, "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01", "\x7F\x00\x00\x01"]
TCPSocket.gethostbyname('localhost') # => ["localhost.localdomain", ["localhost", "x1carbon", "localhost", "x1carbon"], 10, "::1", "127.0.0.1"]
@brixen
Copy link

brixen commented Dec 23, 2015

Is this MRI? What version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment