mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
Reapply "[ruby/uri] Warn compatibility methods in RFC3986_PARSER"
This reverts commit 3da7e440e9
.
This commit is contained in:
parent
ea828c0bf0
commit
b41d79962a
Notes:
git
2024-08-21 05:52:48 +00:00
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue