File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -79,9 +79,9 @@ def initialize(cookie, config)
7979 @raw_cookie = cookie
8080 @config = config
8181 @attributes = {
82- "secure" => nil ,
83- "httponly" => nil ,
84- "samesite" => nil ,
82+ httponly : nil ,
83+ samesite : nil ,
84+ secure : nil ,
8585 }
8686
8787 parse ( cookie )
@@ -114,7 +114,7 @@ def parsed_cookie
114114 end
115115
116116 def already_flagged? ( attribute )
117- @attributes [ attribute . to_s ]
117+ @attributes [ attribute ]
118118 end
119119
120120 def flag_cookie? ( attribute )
@@ -178,8 +178,9 @@ def parse(cookie)
178178 name , values = pairs . split ( '=' , 2 )
179179 name = CGI . unescape ( name )
180180
181- if @attributes . has_key? ( name . downcase )
182- @attributes [ name . downcase ] = values || true
181+ attribute = name . downcase . to_sym
182+ if @attributes . has_key? ( attribute )
183+ @attributes [ attribute ] = values || true
183184 end
184185 end
185186 end
You can’t perform that action at this time.
0 commit comments