End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
URI.join
join(*str)
lib/uri/common.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.1.3/lib/uri/common.rb, line 224
def self.join(*str)
RFC3986_PARSER.join(*str)
end
Synopsis
URI::join(str[, str, ...])
Args
str-
String(s) to work with, will be converted to RFC3986 URIs before merging.
Description
Joins URIs.
Usage
Example
require 'uri' 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>