diff options
author | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-21 14:40:03 +0000 |
---|---|---|
committer | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-21 14:40:03 +0000 |
commit | dabdec31e4f10a83036cfb368bf3a7d4d20cf2d8 (patch) | |
tree | 3d9ecd3ea1abd0a7d2eb79aa0d3a71d2207b4b3c /lib/ipaddr.rb | |
parent | 4c6eb271ddecc8534d10449ec2ca40df6bea2e58 (diff) |
Use caller with length to reduce unused strings
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/ipaddr.rb')
-rw-r--r-- | lib/ipaddr.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ipaddr.rb b/lib/ipaddr.rb index ecf28ebb25..0f3a5e2878 100644 --- a/lib/ipaddr.rb +++ b/lib/ipaddr.rb @@ -310,7 +310,7 @@ class IPAddr # Returns true if the ipaddr is an IPv4-compatible IPv6 address. def ipv4_compat? - warn "#{caller(1)[0]}: warning: IPAddr\##{__callee__} is obsolete" if $VERBOSE + warn "#{caller(1, 1)[0]}: warning: IPAddr\##{__callee__} is obsolete" if $VERBOSE _ipv4_compat? end @@ -336,7 +336,7 @@ class IPAddr # Returns a new ipaddr built by converting the native IPv4 address # into an IPv4-compatible IPv6 address. def ipv4_compat - warn "#{caller(1)[0]}: warning: IPAddr\##{__callee__} is obsolete" if $VERBOSE + warn "#{caller(1, 1)[0]}: warning: IPAddr\##{__callee__} is obsolete" if $VERBOSE if !ipv4? raise InvalidAddressError, "not an IPv4 address" end |