Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
IPAddr#ipv6?
ipv6?
lib/ipaddr.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.3.0/lib/ipaddr.rb, line 245
def ipv6?
return @family == Socket::AF_INET6
end
Returns true if the ipaddr is an IPv6 address.
See also
#ipv4_mapped?
#link_local?
#ipv4_mapped
#loopback?
also in
4.1 · 4.0 · 3.4 · 3.2 · 3.1 · 3.0