Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
URI::Generic#replace!
(::URI::Generic oth) -> ::URI::Generic
replace!(oth)
lib/uri/generic.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/uri/generic.rb, line 299
def replace!(oth)
if self.class != oth.class
raise ArgumentError, "expected #{self.class} object"
end
component.each do |c|
self.__send__("#{c}=", oth.__send__(c))
end
end
Replaces self by other URI object.