From 228cfd02d5d7035480556cb65476ca89996922c7 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 15 May 2015 08:59:33 +0000 Subject: 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 --- lib/cgi/cookie.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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. -- cgit v1.2.3