End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
URI::Generic#merge!
merge!(oth)
lib/uri/generic.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/lib/uri/generic.rb, line 1081
def merge!(oth)
t = merge(oth)
if self == t
nil
else
replace!(t)
self
end
end
Args
Description
Destructive form of merge.
Usage
Example
require 'uri' uri = URI.parse("http://my.example.com") uri.merge!("/main.rbx?page=1") uri.to_s # => "http://my.example.com/main.rbx?page=1"