aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-03-07 09:36:07 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2011-03-07 09:36:07 -0800
commit5968d7a65886d3450698889f685eccaf54749f43 (patch)
tree86ce7affa6185046b5df292c9931f853e820e8ac /activesupport/lib/active_support
parenta032212e7c1da834ae75d85a4f2f1f943bfdc474 (diff)
downloadrails-5968d7a65886d3450698889f685eccaf54749f43.tar.gz
rails-5968d7a65886d3450698889f685eccaf54749f43.tar.bz2
rails-5968d7a65886d3450698889f685eccaf54749f43.zip
do not test explicit equality of predicate methods, they should be allowed to return truthy or falsey objects
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r--activesupport/lib/active_support/cache.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/activesupport/lib/active_support/cache.rb b/activesupport/lib/active_support/cache.rb
index e2b7b0707b..10c457bb1d 100644
--- a/activesupport/lib/active_support/cache.rb
+++ b/activesupport/lib/active_support/cache.rb
@@ -590,11 +590,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?
- if @expires_in && @created_at + @expires_in <= Time.now.to_f
- true
- else
- false
- end
+ @expires_in && @created_at + @expires_in <= Time.now.to_f
end
# Set a new time when the entry will expire.