mirror of
https://github.com/samsonjs/http-cookie.git
synced 2026-03-25 08:55:53 +00:00
Use case-when.
This commit is contained in:
parent
1d9dc5754c
commit
25630b35e7
1 changed files with 4 additions and 3 deletions
|
|
@ -521,9 +521,10 @@ class HTTP::Cookie
|
|||
host = DomainName.new(uri.host)
|
||||
|
||||
# RFC 6265 5.3
|
||||
return true if host.hostname == @domain
|
||||
|
||||
if @for_domain # !host-only-flag
|
||||
case
|
||||
when host.hostname == @domain
|
||||
true
|
||||
when @for_domain # !host-only-flag
|
||||
host.cookie_domain?(@domain_name)
|
||||
else
|
||||
@domain.nil?
|
||||
|
|
|
|||
Loading…
Reference in a new issue