rails/rails — pull request #11574 by pftg (2013-07-23 19:41:04+00:00)
Title: #11552: Fix assign ip address with invalid values raise exception

In order that set attribute should not be bang method, rescue invalid ip address exceptions.

There is two options to resolve #11552 issue:

* remain invalid value as attribute value and rescue all exceptions on type casting, like I have proposed in this PR
* return default `IPAddr.new` value like `BigDecimal` does: `IPAddr.new 'invalid' #=> #`