Skip to content

Commit

Permalink
Fixing behavior for IPSocket#getaddress
Browse files Browse the repository at this point in the history
* Just rely on Socket.getaddrinfo instead of doing the FFI call.
  • Loading branch information
febuiles committed Jun 18, 2008
1 parent 7e6bc70 commit 07a2efa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/socket.rb
Expand Up @@ -196,7 +196,7 @@ def self.getaddrinfo(host, service, family, socktype, protocol, flags)
end

def self.getaddress(host)
addrinfos = Socket::Foreign.getaddrinfo(host, nil, 0, 0, 0, Socket::NI_NUMERICHOST)
addrinfos = Socket.getaddrinfo(host)
addrinfos.first[3]
end

Expand Down

0 comments on commit 07a2efa

Please sign in to comment.