Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
class method
URI.join
join(*str)
lib/uri/common.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.3.0/lib/uri/common.rb, line 211
def self.join(*str)
RFC3986_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>