ruby-changes:52028
From: knu <ko1@a...>
Date: Thu, 9 Aug 2018 17:41:01 +0900 (JST)
Subject: [ruby-changes:52028] knu:r64244 (trunk): Include the input in the message when raising InvalidAddressError
knu 2018-08-09 17:40:54 +0900 (Thu, 09 Aug 2018) New Revision: 64244 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64244 Log: Include the input in the message when raising InvalidAddressError [Feature #5987] Modified files: trunk/lib/ipaddr.rb Index: lib/ipaddr.rb =================================================================== --- lib/ipaddr.rb (revision 64243) +++ lib/ipaddr.rb (revision 64244) @@ -594,6 +594,8 @@ class IPAddr https://github.com/ruby/ruby/blob/trunk/lib/ipaddr.rb#L594 else @mask_addr = (@family == Socket::AF_INET) ? IN4MASK : IN6MASK end + rescue InvalidAddressError => e + raise e.class, "#{e.message}: #{addr}" end def coerce_other(other) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/