class method
URI.join
(::_ToStr | ::URI::Generic str, *::_ToStr | ::URI::Generic strs) -> ::URI::Generic
join(*str)
lib/uri/common.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/uri/common.rb, line 273
def self.join(*str)
DEFAULT_PARSER.join(*str)
end
Merges the given URI strings str per RFC 2396.
Each string in str is converted to an RFC3986 URI before being merged.
Examples:
Example
URI.join("http://example.com/","main.rbx") # => #<URI::HTTP http://example.com/main.rbx> URI.join('http://example.com', 'foo') # => #<URI::HTTP http://example.com/foo> URI.join('http://example.com', '/foo', '/bar') # => #<URI::HTTP http://example.com/bar> URI.join('http://example.com', '/foo', 'bar') # => #<URI::HTTP http://example.com/bar> URI.join('http://example.com', '/foo/', 'bar') # => #<URI::HTTP http://example.com/foo/bar>