diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-01-07 08:12:03 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-01-07 08:12:03 +0000 |
commit | 7324444344b428727e2fcfed674dd818ef57b1ad (patch) | |
tree | 3575c3cae38cebcc9f1b73eddbfbf7a855dfaf5b /actionpack | |
parent | 3600536b04ca7e902c5ad594175feb451261cc81 (diff) | |
download | rails-7324444344b428727e2fcfed674dd818ef57b1ad.tar.gz rails-7324444344b428727e2fcfed674dd818ef57b1ad.tar.bz2 rails-7324444344b428727e2fcfed674dd818ef57b1ad.zip |
Ruby 1.9 compat: cookie store delete sets nil value instead of empty string
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8589 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_controller/session/cookie_store.rb | 2 | ||||
-rwxr-xr-x | actionpack/test/controller/session/cookie_store_test.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/session/cookie_store.rb b/actionpack/lib/action_controller/session/cookie_store.rb index 0a2a91f01e..5e5ef1bfb0 100644 --- a/actionpack/lib/action_controller/session/cookie_store.rb +++ b/actionpack/lib/action_controller/session/cookie_store.rb @@ -117,7 +117,7 @@ class CGI::Session::CookieStore def delete @data = nil clear_old_cookie_value - write_cookie('value' => '', 'expires' => 1.year.ago) + write_cookie('value' => nil, 'expires' => 1.year.ago) end # Generate the HMAC keyed message digest. Uses SHA1 by default. diff --git a/actionpack/test/controller/session/cookie_store_test.rb b/actionpack/test/controller/session/cookie_store_test.rb index 0fdfa29568..d308f2a31b 100755 --- a/actionpack/test/controller/session/cookie_store_test.rb +++ b/actionpack/test/controller/session/cookie_store_test.rb @@ -175,7 +175,7 @@ class CookieStoreTest < Test::Unit::TestCase def assert_cookie_deleted(session, message = 'Expected session deletion cookie to be set') assert_equal 1, session.cgi.output_cookies.size cookie = session.cgi.output_cookies.first - assert_cookie cookie, nil, 1.year.ago.to_date, message + assert_cookie cookie, nil, 1.year.ago.to_date, "#{message}: #{cookie.name} => #{cookie.value}" end def assert_cookie(cookie, value = nil, expires = nil, message = nil) |