Why are the IPSocket class methods valid?, valid_v4? and valid_v6?
(defined in ipaddr.rb) not defined if the constant AF_INET6 is.
From ipaddr.rb:
unless Socket.const_defined? "AF_INET6"
class Socket
AF_INET6 = Object.new
end
class << IPSocket
def valid_v4?(addr)
[…]
end
def valid_v6?(addr)
[…]
end
def valid(addr)
[…]
end
end
end
Shouldn’t it be:
unless Socket.const_defined? "AF_INET6"
class Socket
AF_INET6 = Object.new
end
end
class << IPSocket
def valid_v4?(addr)
[…]
end
def valid_v6?(addr)
[…]
end
def valid(addr)
[…]
end
end
By the way:
$ ruby -v
ruby 1.8.1 (2003-12-25) [i586-linux-gnu]
Guillaume.