summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/cgi/cookie.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/cgi/cookie.rb b/lib/cgi/cookie.rb
index eb100be1c2..f92e535bb8 100644
--- a/lib/cgi/cookie.rb
+++ b/lib/cgi/cookie.rb
@@ -128,7 +128,8 @@ class CGI
#
# +val+ must be a boolean.
def secure=(val)
- @secure = !!val
+ @secure = val if val == true or val == false
+ @secure
end
# Set whether the Cookie is a httponly cookie or not.