aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2012-10-10 11:54:14 -0700
committerDavid Heinemeier Hansson <david@loudthinking.com>2012-10-10 11:54:14 -0700
commit1644f1237b6bc21f4a7953db3350643fcf86ae9e (patch)
tree5fad53e909e746b194794b437f6ec26a4e34ad13
parentbf24ba98b37613742aa292000cdcb29f866918a8 (diff)
parentb21f24d9807bd161af947cf0f0cc440c9adffb73 (diff)
downloadrails-1644f1237b6bc21f4a7953db3350643fcf86ae9e.tar.gz
rails-1644f1237b6bc21f4a7953db3350643fcf86ae9e.tar.bz2
rails-1644f1237b6bc21f4a7953db3350643fcf86ae9e.zip
Merge pull request #7902 from josh/fix-bug-in-as-cache-upgrade
Fix AS::Cache version upgrading bug
-rw-r--r--activesupport/lib/active_support/cache.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/cache.rb b/activesupport/lib/active_support/cache.rb
index 690e5ce194..732ab4b7df 100644
--- a/activesupport/lib/active_support/cache.rb
+++ b/activesupport/lib/active_support/cache.rb
@@ -644,7 +644,7 @@ module ActiveSupport
@c = @compressed
remove_instance_variable(:@compressed)
end
- if defined?(@expires_in) && defined?(@created_at)
+ if defined?(@expires_in) && defined?(@created_at) && @expires_in && @created_at
@x = (@created_at + @expires_in).to_i
remove_instance_variable(:@created_at)
remove_instance_variable(:@expires_in)