summaryrefslogtreecommitdiff
path: root/lib/cgi/cookie.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-05-15 08:59:33 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-05-15 08:59:33 +0000
commit228cfd02d5d7035480556cb65476ca89996922c7 (patch)
tree772bff84a7e9729b1709be2b68de3b561eb79b84 /lib/cgi/cookie.rb
parenta4344cb5b45953b750bc7329110b7c44de4f09a0 (diff)
cookie.rb: revert part of r50496
* lib/cgi/cookie.rb (CGI::Cookie#secure): revert part of r50496, which is irrelevant to GH-887, as the document states that the argument must be a boolean. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/cgi/cookie.rb')
-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 eb100be1c2f..f92e535bb86 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.