зеркало из https://github.com/github/ruby.git
[ruby/uri] Added compatibility methods for RFC2396 parser
https://github.com/ruby/uri/commit/bbb8a40eae
This commit is contained in:
Родитель
08e449d89b
Коммит
6452cf5cb5
|
@ -135,12 +135,31 @@ module URI
|
|||
URI.for(*self.split(uri), self)
|
||||
end
|
||||
|
||||
|
||||
def join(*uris) # :nodoc:
|
||||
uris[0] = convert_to_uri(uris[0])
|
||||
uris.inject :merge
|
||||
end
|
||||
|
||||
# Compatibility for RFC2396 parser
|
||||
def extract(str, schemes = nil) # :nodoc:
|
||||
RFC2396_PARSER.extract(str, schemes)
|
||||
end
|
||||
|
||||
# Compatibility for RFC2396 parser
|
||||
def make_regexp(schemes = nil) # :nodoc:
|
||||
RFC2396_PARSER.make_regexp(schemes)
|
||||
end
|
||||
|
||||
# Compatibility for RFC2396 parser
|
||||
def escape(str, unsafe = nil) # :nodoc:
|
||||
unsafe ? RFC2396_PARSER.escape(str, unsafe) : RFC2396_PARSER.escape(str)
|
||||
end
|
||||
|
||||
# Compatibility for RFC2396 parser
|
||||
def unescape(str, escaped = nil) # :nodoc:
|
||||
escaped ? RFC2396_PARSER.unescape(str, escaped) : RFC2396_PARSER.unescape(str)
|
||||
end
|
||||
|
||||
@@to_s = Kernel.instance_method(:to_s)
|
||||
if @@to_s.respond_to?(:bind_call)
|
||||
def inspect
|
||||
|
|
Загрузка…
Ссылка в новой задаче