Skip to content

End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

IPAddr#native

native

Returns a new ipaddr built by converting the IPv6 address into a native IPv4 address. If the IP address is not an IPv4-mapped or IPv4-compatible IPv6 address, returns self.

See also #mask! #prefix #mask #prefix= also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1