aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorOlek Janiszewski <olek.janiszewski@gmail.com>2011-11-23 18:11:36 +0100
committerOlek Janiszewski <olek.janiszewski@gmail.com>2011-11-23 18:11:38 +0100
commita650dd05f82028e8d1310f1b68b7bc430ea47dcf (patch)
tree9bd9b1a6ea04610dea87b357bb8ee4f19557f8bb /activesupport/lib
parentd8e6dc9cf12096908a7a53dec07a397ba23b1088 (diff)
downloadrails-a650dd05f82028e8d1310f1b68b7bc430ea47dcf.tar.gz
rails-a650dd05f82028e8d1310f1b68b7bc430ea47dcf.tar.bz2
rails-a650dd05f82028e8d1310f1b68b7bc430ea47dcf.zip
Fix #3737 AS::expand_cache_key generates wrong key in certain situations (part 2)
`nil` and `false` both expand to `""` (empty string), while `true` expands to `"true"`; `false` should expand to `"false"`
Diffstat (limited to 'activesupport/lib')
-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 cfd1a6dbe3..12eeff4f4b 100644
--- a/activesupport/lib/active_support/cache.rb
+++ b/activesupport/lib/active_support/cache.rb
@@ -84,7 +84,7 @@ module ActiveSupport
case
when key.respond_to?(:cache_key) then key.cache_key
when key.is_a?(Array) then key.map { |element| expand_cache_key(element) }.to_param
- when key then key.to_param
+ else key.to_param
end.to_s
expanded_cache_key