diff options
author | José Valim <jose.valim@gmail.com> | 2010-10-03 21:45:27 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-10-03 21:45:30 +0200 |
commit | 653acac069e66f53b791caa4838a1e25de905f31 (patch) | |
tree | 6adf5e0ff2c9fd6a198cd7faf30d294700a57096 /actionpack/lib | |
parent | 74dd8a3681c6984ea35c879f88c6a87521b58ec2 (diff) | |
download | rails-653acac069e66f53b791caa4838a1e25de905f31.tar.gz rails-653acac069e66f53b791caa4838a1e25de905f31.tar.bz2 rails-653acac069e66f53b791caa4838a1e25de905f31.zip |
Solve some warnings and a failing test.
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/test_case.rb | 1 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/http/request.rb | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb index d7b54c2abc..6061945622 100644 --- a/actionpack/lib/action_controller/test_case.rb +++ b/actionpack/lib/action_controller/test_case.rb @@ -191,6 +191,7 @@ module ActionController DEFAULT_OPTIONS = Rack::Session::Abstract::ID::DEFAULT_OPTIONS def initialize(session = {}) + @env, @by = nil, nil replace(session.stringify_keys) @loaded = true end diff --git a/actionpack/lib/action_dispatch/http/request.rb b/actionpack/lib/action_dispatch/http/request.rb index 09d6ba8223..bbcdefb190 100644 --- a/actionpack/lib/action_dispatch/http/request.rb +++ b/actionpack/lib/action_dispatch/http/request.rb @@ -199,7 +199,7 @@ module ActionDispatch # TODO This should be broken apart into AD::Request::Session and probably # be included by the session middleware. def reset_session - session.destroy if session + session.destroy if session && session.respond_to?(:destroy) self.session = {} @env['action_dispatch.request.flash_hash'] = nil end |