Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
CGI::Cookie#domain=
(::String domain) -> ::String
domain=(str)
lib/cgi/cookie.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/lib/cgi/cookie.rb, line 126
def domain=(str)
if str and ((str = str.b).bytesize > 255 or !DOMAIN_VALUE_RE.match?(str))
raise ArgumentError, "invalid domain: #{str.dump}"
end
@domain = str
end
Set domain for which this cookie applies