lib/net/dns/rr/a.rb in net-dns2-0.8.2 vs lib/net/dns/rr/a.rb in net-dns2-0.8.3

- old
+ new

@@ -90,12 +90,10 @@ def check_address(input) address = case input when IPAddr input when Integer # Address in numeric form - tmp = [(input >> 24), (input >> 16) & 0xFF, (input >> 8) & 0xFF, input & 0xFF] - tmp = tmp.collect { |x| x.to_s }.join(".") - IPAddr.new(tmp) + IPAddr.new(input, Socket::AF_INET) # We know we are IPv4 when String IPAddr.new(input) else raise ArgumentError, "Invalid IP address `#{input}'" end