From 640ea1b2972f86c4030626975addd3facd105685 Mon Sep 17 00:00:00 2001 From: Akinori MUSHA Date: Thu, 18 Apr 2013 21:42:22 +0900 Subject: [PATCH] Omit calling #expires= when #max_age= is going to be called. --- lib/http/cookie.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/http/cookie.rb b/lib/http/cookie.rb index 0bb3ac8..4250b70 100644 --- a/lib/http/cookie.rb +++ b/lib/http/cookie.rb @@ -174,7 +174,7 @@ class HTTP::Cookie # Let max_age take precedence over expires max_age = val when :expires, :expires_at - self.expires = val + self.expires = val unless max_age when :httponly, :httponly? @httponly = val when :secure, :secure?