End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
URI::Generic#set_userinfo
set_userinfo(user, password = nil)
lib/uri/generic.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/lib/uri/generic.rb, line 509
def set_userinfo(user, password = nil)
unless password
user, password = split_userinfo(user)
end
@user = user
@password = password if password
[@user, @password]
end
Protected setter for the user component, and password if available (with validation).
See also URI::Generic.userinfo=.
See also
#set_user
#split_path
#set_scheme
#split_userinfo
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1