End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
IPAddr.ntop
ntop(addr)
lib/ipaddr.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/lib/ipaddr.rb, line 113
def self.ntop(addr)
case addr.size
when 4
addr.unpack('C4').join('.')
when 16
IN6FORMAT % addr.unpack('n8')
else
raise AddressFamilyError, "unsupported address family"
end
end
Convert a network byte ordered string form of an IP address into human readable form.