diff options
author | Hiroshi SHIBATA <[email protected]> | 2024-08-21 12:06:37 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2024-08-21 14:52:29 +0900 |
commit | b41d79962abefbe8b70d76dee134b44a3a3d3929 (patch) | |
tree | a22ce8b3999ee2866567b6b1746601f43f0f2b21 | |
parent | ea828c0bf0233c36384bb8c6d1ea8ed79d7b3884 (diff) |
Reapply "[ruby/uri] Warn compatibility methods in RFC3986_PARSER"
This reverts commit 3da7e440e9fca835f5475a98f1c0afb4d2ac71db.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11416
-rw-r--r-- | lib/uri/rfc3986_parser.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/uri/rfc3986_parser.rb b/lib/uri/rfc3986_parser.rb index cac75a363a..a8a8c74e77 100644 --- a/lib/uri/rfc3986_parser.rb +++ b/lib/uri/rfc3986_parser.rb @@ -147,16 +147,19 @@ module URI # Compatibility for RFC2396 parser def make_regexp(schemes = nil) # :nodoc: + warn "URI::RFC3986_PARSER.make_regexp is obsoleted. Use URI::RFC2396_PARSER.make_regexp explicitly.", uplevel: 1 if $VERBOSE RFC2396_PARSER.make_regexp(schemes) end # Compatibility for RFC2396 parser def escape(str, unsafe = nil) # :nodoc: + warn "URI::RFC3986_PARSER.escape is obsoleted. Use URI::RFC2396_PARSER.escape explicitly.", uplevel: 1 if $VERBOSE unsafe ? RFC2396_PARSER.escape(str, unsafe) : RFC2396_PARSER.escape(str) end # Compatibility for RFC2396 parser def unescape(str, escaped = nil) # :nodoc: + warn "URI::RFC3986_PARSER.unescape is obsoleted. Use URI::RFC2396_PARSER.unescape explicitly.", uplevel: 1 if $VERBOSE escaped ? RFC2396_PARSER.unescape(str, escaped) : RFC2396_PARSER.unescape(str) end |