From: "drbrain (Eric Hodel)" Date: 2012-06-09T07:23:41+09:00 Subject: [ruby-core:45524] [ruby-trunk - Bug #6560][Assigned] stdlib/ipaddr: IPSocket.valid? not defined as the documentation says Issue #6560 has been updated by drbrain (Eric Hodel). Category set to lib Status changed from Open to Assigned Assignee set to knu (Akinori MUSHA) ---------------------------------------- Bug #6560: stdlib/ipaddr: IPSocket.valid? not defined as the documentation says https://bugs.ruby-lang.org/issues/6560#change-27109 Author: paddor (Patrik Wenger) Status: Assigned Priority: Normal Assignee: knu (Akinori MUSHA) Category: lib 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/