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:
parent
c6b26f5ccf
commit
d3b28ebc7a
1 changed files with 2 additions and 2 deletions
|
@ -99,7 +99,7 @@ module URI
|
||||||
# # => "@%3F@%21"
|
# # => "@%3F@%21"
|
||||||
#
|
#
|
||||||
def escape(*arg)
|
def escape(*arg)
|
||||||
warn "URI.escape is obsolete", uplevel: 1
|
warn "URI.#{__callee__} is obsolete", uplevel: 1
|
||||||
DEFAULT_PARSER.escape(*arg)
|
DEFAULT_PARSER.escape(*arg)
|
||||||
end
|
end
|
||||||
alias encode escape
|
alias encode escape
|
||||||
|
@ -130,7 +130,7 @@ module URI
|
||||||
# # => "http://example.com/?a=\t\r"
|
# # => "http://example.com/?a=\t\r"
|
||||||
#
|
#
|
||||||
def unescape(*arg)
|
def unescape(*arg)
|
||||||
warn "URI.unescape is obsolete", uplevel: 1
|
warn "URI.#{__callee__} is obsolete", uplevel: 1
|
||||||
DEFAULT_PARSER.unescape(*arg)
|
DEFAULT_PARSER.unescape(*arg)
|
||||||
end
|
end
|
||||||
alias decode unescape
|
alias decode unescape
|
||||||
|
|
Loading…
Reference in a new issue