1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Fix warnings for URI.encode and URI.decode

Use __callee__ to display the called method.

Fixes [Bug #16469]
This commit is contained in:
Jeremy Evans 2020-01-09 13:09:06 -08:00
parent c6b26f5ccf
commit d3b28ebc7a

View file

@ -99,7 +99,7 @@ module URI
# # => "@%3F@%21"
#
def escape(*arg)
warn "URI.escape is obsolete", uplevel: 1
warn "URI.#{__callee__} is obsolete", uplevel: 1
DEFAULT_PARSER.escape(*arg)
end
alias encode escape
@ -130,7 +130,7 @@ module URI
# # => "http://example.com/?a=\t\r"
#
def unescape(*arg)
warn "URI.unescape is obsolete", uplevel: 1
warn "URI.#{__callee__} is obsolete", uplevel: 1
DEFAULT_PARSER.unescape(*arg)
end
alias decode unescape