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/uri/common.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/uri/common.rb')
-rw-r--r-- | lib/uri/common.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/uri/common.rb b/lib/uri/common.rb index 74bbdea0a4..a082c2a918 100644 --- a/lib/uri/common.rb +++ b/lib/uri/common.rb @@ -100,7 +100,7 @@ module URI # # => "@%3F@%21" # def escape(*arg) - warn "#{caller(1)[0]}: warning: URI.escape is obsolete" if $VERBOSE + warn "#{caller(1, 1)[0]}: warning: URI.escape is obsolete" if $VERBOSE DEFAULT_PARSER.escape(*arg) end alias encode escape @@ -132,7 +132,7 @@ module URI # # => "http://example.com/?a=\t\r" # def unescape(*arg) - warn "#{caller(1)[0]}: warning: URI.unescape is obsolete" if $VERBOSE + warn "#{caller(1, 1)[0]}: warning: URI.unescape is obsolete" if $VERBOSE DEFAULT_PARSER.unescape(*arg) end alias decode unescape @@ -300,7 +300,7 @@ module URI # # => ["http://foo.example.com/bla", "mailto:[email protected]"] # def self.extract(str, schemes = nil, &block) - warn "#{caller(1)[0]}: warning: URI.extract is obsolete" if $VERBOSE + warn "#{caller(1, 1)[0]}: warning: URI.extract is obsolete" if $VERBOSE DEFAULT_PARSER.extract(str, schemes, &block) end @@ -336,7 +336,7 @@ module URI # end # def self.regexp(schemes = nil) - warn "#{caller(1)[0]}: warning: URI.regexp is obsolete" if $VERBOSE + warn "#{caller(1, 1)[0]}: warning: URI.regexp is obsolete" if $VERBOSE DEFAULT_PARSER.make_regexp(schemes) end |