summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2025-02-02 16:11:09 +0900
committergit <svn-admin@ruby-lang.org>2025-02-27 04:32:27 +0000
commit75f07afd1897a81a18d3e40b57e8a5731d455827 (patch)
tree16d3b40b76ac68fbf4f9eaad46bb6fc191517f33
parent31bd669f67e19f675f8de8b6cf9df74ea2c60103 (diff)
[ruby/uri] Use a fully qualified name in warning messages
Currently, some warning messages don't contain a `URI` like the following. ```ruby warning: URI::ABS_URI is obsolete. Use RFC2396_PARSER.regexp[:ABS_URI] explicitly. ``` But, without `URI` prefix, the suggested value doesn't work. So I think we should use a fully qualified name to avoid confusion. https://github.com/ruby/uri/commit/428eb10e44
-rw-r--r--lib/uri/common.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/uri/common.rb b/lib/uri/common.rb
index 1f6ba25d42..1115736297 100644
--- a/lib/uri/common.rb
+++ b/lib/uri/common.rb
@@ -49,10 +49,10 @@ module URI
warn "URI::REGEXP is obsolete. Use URI::RFC2396_REGEXP explicitly.", uplevel: 1 if $VERBOSE
URI::RFC2396_REGEXP
elsif value = RFC2396_PARSER.regexp[const]
- warn "URI::#{const} is obsolete. Use RFC2396_PARSER.regexp[#{const.inspect}] explicitly.", uplevel: 1 if $VERBOSE
+ warn "URI::#{const} is obsolete. Use URI::RFC2396_PARSER.regexp[#{const.inspect}] explicitly.", uplevel: 1 if $VERBOSE
value
elsif value = RFC2396_Parser.const_get(const)
- warn "URI::#{const} is obsolete. Use RFC2396_Parser::#{const} explicitly.", uplevel: 1 if $VERBOSE
+ warn "URI::#{const} is obsolete. Use URI::RFC2396_Parser::#{const} explicitly.", uplevel: 1 if $VERBOSE
value
else
super