aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/cache.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-12-29 17:13:47 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-01-01 22:28:07 -0300
commitddd0a22133e3aff87f9a966af3ddf85c41f42d2e (patch)
tree0f883355214cc4b4e00f6cc6145a69e45c05a985 /activesupport/lib/active_support/cache.rb
parent8b07f18599854475a69c1447642dd3d80bea8df9 (diff)
downloadrails-ddd0a22133e3aff87f9a966af3ddf85c41f42d2e.tar.gz
rails-ddd0a22133e3aff87f9a966af3ddf85c41f42d2e.tar.bz2
rails-ddd0a22133e3aff87f9a966af3ddf85c41f42d2e.zip
Check by @v before converting the entry on expired?
We should convert when @v is defined not @value. The test was calling value first that already converts the entry so we are not catching this bug.
Diffstat (limited to 'activesupport/lib/active_support/cache.rb')
-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 ff67a6828c..d49cd7988f 100644
--- a/activesupport/lib/active_support/cache.rb
+++ b/activesupport/lib/active_support/cache.rb
@@ -622,7 +622,7 @@ module ActiveSupport
# Check if the entry is expired. The +expires_in+ parameter can override
# the value set when the entry was created.
def expired?
- convert_version_4beta1_entry! if defined?(@value)
+ convert_version_4beta1_entry! if defined?(@v)
@expires_in && @created_at + @expires_in <= Time.now.to_f
end