Skip to content

Commit

Permalink
Fix warnings for URI.encode and URI.decode
Browse files Browse the repository at this point in the history
Use __callee__ to display the called method.

Fixes [Bug #16469]
  • Loading branch information
jeremyevans committed Jan 9, 2020
1 parent c6b26f5 commit d3b28eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/uri/common.rb
Expand Up @@ -99,7 +99,7 @@ module Escape
# # => "@%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
Expand Down Expand Up @@ -130,7 +130,7 @@ def escape(*arg)
# # => "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
Expand Down

1 comment on commit d3b28eb

@mathieujobin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cute, you never cherry-pick this warning fix to 2.7, the version that it mattered...
I only found out today encode == escape OMG ...

Please sign in to comment.