From c3e4fae60c32356d060a3585256c044d55223622 Mon Sep 17 00:00:00 2001 From: Akinori MUSHA Date: Thu, 18 Oct 2012 18:59:37 +0900 Subject: [PATCH] Refer to the instance variable @domain instead of the accessor. --- lib/http/cookie.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/http/cookie.rb b/lib/http/cookie.rb index 4c66880..17045f3 100644 --- a/lib/http/cookie.rb +++ b/lib/http/cookie.rb @@ -251,11 +251,11 @@ class HTTP::Cookie # RFC 6265 5.3 # When the user agent "receives a cookie": - return domain.nil? || host.hostname == domain unless @for_domain + return @domain.nil? || host.hostname == @domain unless @for_domain if host.cookie_domain?(@domain_name) true - elsif host.hostname == domain + elsif host.hostname == @domain @for_domain = false true else