Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
URI::Generic#merge!
(::URI::Generic | ::string oth) -> ::String
merge!(oth)
lib/uri/generic.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/uri/generic.rb, line 1108
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"