rubinius/rubinius — pull request #1615 by ryoqun (2012-03-13 12:14:08+00:00)
Title: Don't raise after error in getnameinfo()

When the computer isn't connected to any network, some specs fail only on
Rubinius. They don't on MRI.

The cause was that Rubinius's getnameinfo() is slightly different from MRI's one
in the corner case of error handling.

So, Rubinius's getnameinfo() is changed to be aligned with MRI's.

One of the failing specs is this:

Socket#getaddrinfo accepts empty addresses for IPv4 passive sockets ERROR
SocketError: Temporary failure in name resolution

By the way, I'm not sure how to spec this behavior because I can only reproduce this by manually disabling my network. I'm not very familiar with these resolve-related functions... Hence, I'm requesting a pull request instead of a direct push.

FYI, the corresponding MRI's getnameinfo() is here:
https://github.com/ruby/ruby/blob/5525d82134/ext/socket/raddrinfo.c#L404