lib/ipaddress.rb in ipaddress-0.6.0 vs lib/ipaddress.rb in ipaddress-0.7.0

- old
+ new

@@ -44,14 +44,10 @@ def IPAddress::parse(str) case str when /:.+\./ IPAddress::IPv6::Mapped.new(str) else - begin - IPAddress::IPv4.new(str) - rescue ArgumentError - IPAddress::IPv6.new(str) - end + IPAddress::IPv4.new(str) rescue IPAddress::IPv6.new(str) end end # # Checks if the given string is a valid IP address,