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

Warn for URI.{,un}{escape,encode}, even if not in verbose mode

The verbose mode warning has been present for almost 10 years.
If we ever plan to remove these methods, we should make the warning
a regular deprecation warning so that people are aware.

Implements [Feature #15961]
This commit is contained in:
Jeremy Evans 2019-06-26 13:20:22 -07:00
parent a2c26fe1c6
commit 869e2dd8c8
Notes: git 2019-09-27 23:44:01 +09:00

View file

@ -99,7 +99,7 @@ module URI
# # => "@%3F@%21"
#
def escape(*arg)
warn "URI.escape is obsolete", uplevel: 1 if $VERBOSE
warn "URI.escape 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 if $VERBOSE
warn "URI.unescape is obsolete", uplevel: 1
DEFAULT_PARSER.unescape(*arg)
end
alias decode unescape