mirror of
https://github.com/samsonjs/http-cookie.git
synced 2026-03-25 08:55:53 +00:00
Reduce warnings.
This commit is contained in:
parent
4845b0de94
commit
15f960bfbd
3 changed files with 6 additions and 10 deletions
|
|
@ -391,16 +391,16 @@ class HTTP::Cookie
|
|||
if (HTTP::Cookie.normalize_path(origin) + './').path != @path
|
||||
string << "; path=#{@path}"
|
||||
end
|
||||
if expires = @expires
|
||||
if @expires
|
||||
string << "; expires=#{@expires.httpdate}"
|
||||
end
|
||||
if comment = @comment
|
||||
if @comment
|
||||
string << "; comment=#{@comment}"
|
||||
end
|
||||
if httponly?
|
||||
if @httponly
|
||||
string << "; HttpOnly"
|
||||
end
|
||||
if secure?
|
||||
if @secure
|
||||
string << "; secure"
|
||||
end
|
||||
string
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
require 'http/cookie_jar'
|
||||
|
||||
class HTTP::CookieJar::AbstractSaver
|
||||
class << self
|
||||
@@class_map = {}
|
||||
|
|
@ -13,7 +11,7 @@ class HTTP::CookieJar::AbstractSaver
|
|||
begin
|
||||
require 'http/cookie_jar/%s_saver' % symbol
|
||||
@@class_map.fetch(symbol)
|
||||
rescue LoadError, IndexError => e
|
||||
rescue LoadError, IndexError
|
||||
raise IndexError, 'cookie saver unavailable: %s' % symbol.inspect
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
require 'http/cookie_jar'
|
||||
|
||||
class HTTP::CookieJar::AbstractStore
|
||||
class << self
|
||||
@@class_map = {}
|
||||
|
|
@ -13,7 +11,7 @@ class HTTP::CookieJar::AbstractStore
|
|||
begin
|
||||
require 'http/cookie_jar/%s_store' % symbol
|
||||
@@class_map.fetch(symbol)
|
||||
rescue LoadError, IndexError => e
|
||||
rescue LoadError, IndexError
|
||||
raise IndexError, 'cookie store unavailable: %s' % symbol.inspect
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue