diff --git a/lib/http/cookie.rb b/lib/http/cookie.rb index 45b7917..df07376 100644 --- a/lib/http/cookie.rb +++ b/lib/http/cookie.rb @@ -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 diff --git a/lib/http/cookie_jar/abstract_saver.rb b/lib/http/cookie_jar/abstract_saver.rb index efc6580..766cc03 100644 --- a/lib/http/cookie_jar/abstract_saver.rb +++ b/lib/http/cookie_jar/abstract_saver.rb @@ -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 diff --git a/lib/http/cookie_jar/abstract_store.rb b/lib/http/cookie_jar/abstract_store.rb index ad1067c..f102cf6 100644 --- a/lib/http/cookie_jar/abstract_store.rb +++ b/lib/http/cookie_jar/abstract_store.rb @@ -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