Fixed an exception while creating a regexp.

premature end of char-class: /^[0123456789abcdefABCDEF:/
Fixed to make all IP tests pass.

IPAddr.new("::1/") does pass for a valid IPv6 address even though it
IMHO shouldn't.
Use def-rescue-end instead of def-begin-rescue-end-end.
whitespace cleanup