From 907bcce9a005002739d6c71a5123b65c2f0ed183 Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Sat, 24 Mar 2012 11:20:43 -0300 Subject: Return the same session data object when setting session id Make sure to return the same hash object instead of returning a new one. Returning a new one causes failures on cookie store tests, where it tests for the 'Set-Cookie' header with the session signature. This is due to the hash ordering changes on Ruby 1.8.7-p358. --- actionpack/lib/action_dispatch/middleware/session/cookie_store.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actionpack/lib/action_dispatch/middleware/session/cookie_store.rb b/actionpack/lib/action_dispatch/middleware/session/cookie_store.rb index 8ebf870b95..29e9e6c261 100644 --- a/actionpack/lib/action_dispatch/middleware/session/cookie_store.rb +++ b/actionpack/lib/action_dispatch/middleware/session/cookie_store.rb @@ -59,7 +59,7 @@ module ActionDispatch end def set_session(env, sid, session_data, options) - session_data.merge("session_id" => sid) + session_data.merge!("session_id" => sid) end def set_cookie(env, session_id, cookie) -- cgit v1.2.3