Reduce warnings.

This commit is contained in:
Akinori MUSHA 2013-03-15 12:31:19 +09:00
parent 4845b0de94
commit 15f960bfbd
3 changed files with 6 additions and 10 deletions

View file

@ -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

View file

@ -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

View file

@ -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