Actions
Bug #15067
closedlibrary/socket/socket/getnameinfo_spec.rb always errors with multiple IP addresses hostname
Bug #15067:
library/socket/socket/getnameinfo_spec.rb always errors with multiple IP addresses hostname
Description
If the hostname is bind with multiple IP addresses, Socket.getnameinfo raises SocketError.
It's the spec of this method.
irb(main):001:0> require "socket"
=> true
irb(main):002:0> Socket.getnameinfo(['AF_INET', 21, 'multi'])
Traceback (most recent call last):
3: from C:/opt/ruby/bin/irb.cmd:21:in `<main>'
2: from (irb):2
1: from (irb):2:in `getnameinfo'
SocketError (sockaddr resolved to multiple nodename)
irb(main):003:0> exit
So, this code always reports error on such host.
library/socket/socket/getnameinfo_spec.rb:110
Actions