From c99899ec2637da552dd55e32c2cf75f302f015ed Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Wed, 26 Jun 2019 13:20:22 -0700 Subject: [PATCH] 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. --- lib/uri/common.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/uri/common.rb b/lib/uri/common.rb index 17d9ffc28c..57c0e52ba6 100644 --- a/lib/uri/common.rb +++ b/lib/uri/common.rb @@ -99,7 +99,7 @@ module Escape # # => "@%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 @@ def escape(*arg) # # => "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 -- 2.21.0