diff options
author | Michael Lovitt <michael@lovitt.net> | 2010-06-27 14:35:31 -0400 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-06-27 22:39:06 +0200 |
commit | ebee77a28a7267d5f23a28ba23c1eb88a2d7d527 (patch) | |
tree | ba00fb81beaf2def53f357131606b23dcb01d7d6 /actionpack/test/fixtures/session_autoload_test | |
parent | a822ce78b39db60fef9d8c3280551f199c91c6b3 (diff) | |
download | rails-ebee77a28a7267d5f23a28ba23c1eb88a2d7d527.tar.gz rails-ebee77a28a7267d5f23a28ba23c1eb88a2d7d527.tar.bz2 rails-ebee77a28a7267d5f23a28ba23c1eb88a2d7d527.zip |
Fixed that an ArgumentError is thrown when request.session_options[:id] is read in the following scenario: when the cookie store is used, and the session contains a serialized object of an unloaded class, and no session data accesses have occurred yet. Pushed the stale_session_check responsibility out of the SessionHash and down into the session store, closer to where the deserialization actually occurs. Added some test coverage for this case and others related to deserialization of unloaded types.
[#4938]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'actionpack/test/fixtures/session_autoload_test')
-rw-r--r-- | actionpack/test/fixtures/session_autoload_test/session_autoload_test/foo.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/test/fixtures/session_autoload_test/session_autoload_test/foo.rb b/actionpack/test/fixtures/session_autoload_test/session_autoload_test/foo.rb new file mode 100644 index 0000000000..4ee7a24561 --- /dev/null +++ b/actionpack/test/fixtures/session_autoload_test/session_autoload_test/foo.rb @@ -0,0 +1,10 @@ +module SessionAutoloadTest + class Foo + def initialize(bar='baz') + @bar = bar + end + def inspect + "#<#{self.class} bar:#{@bar.inspect}>" + end + end +end |