End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
IPAddr#ipv4_mapped
ipv4_mapped
lib/ipaddr.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/lib/ipaddr.rb, line 329
def ipv4_mapped
if !ipv4?
raise InvalidAddressError, "not an IPv4 address"
end
return self.clone.set(@addr | 0xffff00000000, Socket::AF_INET6)
end
Returns a new ipaddr built by converting the native IPv4 address into an IPv4-mapped IPv6 address.