in_addr(addr) private

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/ipaddr.rb, line 520
  def in_addr(addr)
    case addr
    when Array
      octets = addr
      m = RE_IPV4ADDRLIKE.match(addr) or return nil
      octets = m.captures
    octets.inject(0) { |i, s|
      (n = s.to_i) < 256 or raise InvalidAddressError, "invalid address"
      s.match(/\A0./) and raise InvalidAddressError, "zero-filled number in IPv4 address is ambiguous"
      i << 8 | n
Register or log in to add new notes.