Issue #6560 has been reported by paddor (Patrik Wenger).

----------------------------------------
Bug #6560: stdlib/ipaddr: IPSocket.valid? not defined as the documentation says
https://bugs.ruby-lang.org/issues/6560

Author: paddor (Patrik Wenger)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.3.0]


The stdlib documentation of "ipaddr" for Ruby 1.9.3 and 1.9.1 both say there's a method IPSocket.valid?. But that's not the case. The same applies for the methods ::valid_ipv4? and ::valid_ipv6?.

Tested on the following two Ruby installations:
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.3.0]
ruby 1.9.1p376 (2009-12-07 revision 26041) [x86_64-linux]

I had a look at the source file ipaddr.rb and it seems these methods are only defined in case Socket::AF_INET6 is not defined.
This doesn't make any sense in my opinion.

Thanks in advance.



-- 
http://bugs.ruby-lang.org/