mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Include the input in the message when raising InvalidAddressError
[Feature #5987] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
14ad644d84
commit
236e2993ef
1 changed files with 2 additions and 0 deletions
|
|
@ -594,6 +594,8 @@ class IPAddr
|
||||||
else
|
else
|
||||||
@mask_addr = (@family == Socket::AF_INET) ? IN4MASK : IN6MASK
|
@mask_addr = (@family == Socket::AF_INET) ? IN4MASK : IN6MASK
|
||||||
end
|
end
|
||||||
|
rescue InvalidAddressError => e
|
||||||
|
raise e.class, "#{e.message}: #{addr}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def coerce_other(other)
|
def coerce_other(other)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue