summaryrefslogtreecommitdiff
path: root/lib/uri
diff options
context:
space:
mode:
Diffstat (limited to 'lib/uri')
-rw-r--r--lib/uri/common.rb8
-rw-r--r--lib/uri/generic.rb2
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/uri/common.rb b/lib/uri/common.rb
index a082c2a918..764f89d810 100644
--- a/lib/uri/common.rb
+++ b/lib/uri/common.rb
@@ -100,7 +100,7 @@ module URI
# # => "@%3F@%21"
#
def escape(*arg)
- warn "#{caller(1, 1)[0]}: warning: URI.escape is obsolete" if $VERBOSE
+ warn "URI.escape is obsolete", uplevel: 1 if $VERBOSE
DEFAULT_PARSER.escape(*arg)
end
alias encode escape
@@ -132,7 +132,7 @@ module URI
# # => "http://example.com/?a=\t\r"
#
def unescape(*arg)
- warn "#{caller(1, 1)[0]}: warning: URI.unescape is obsolete" if $VERBOSE
+ warn "URI.unescape is obsolete", uplevel: 1 if $VERBOSE
DEFAULT_PARSER.unescape(*arg)
end
alias decode unescape
@@ -300,7 +300,7 @@ module URI
# # => ["http://foo.example.com/bla", "mailto:test@example.com"]
#
def self.extract(str, schemes = nil, &block)
- warn "#{caller(1, 1)[0]}: warning: URI.extract is obsolete" if $VERBOSE
+ warn "URI.extract is obsolete", uplevel: 1 if $VERBOSE
DEFAULT_PARSER.extract(str, schemes, &block)
end
@@ -336,7 +336,7 @@ module URI
# end
#
def self.regexp(schemes = nil)
- warn "#{caller(1, 1)[0]}: warning: URI.regexp is obsolete" if $VERBOSE
+ warn "URI.regexp is obsolete", uplevel: 1 if $VERBOSE
DEFAULT_PARSER.make_regexp(schemes)
end
diff --git a/lib/uri/generic.rb b/lib/uri/generic.rb
index 044d408f50..dc4f9c4c30 100644
--- a/lib/uri/generic.rb
+++ b/lib/uri/generic.rb
@@ -1517,7 +1517,7 @@ module URI
elsif name == 'http_proxy'
unless proxy_uri = env[name]
if proxy_uri = env[name.upcase]
- warn 'The environment variable HTTP_PROXY is discouraged. Use http_proxy.'
+ warn 'The environment variable HTTP_PROXY is discouraged. Use http_proxy.', uplevel: 1
end
end
else