aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/cache.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2012-01-27 20:41:37 +0100
committerDavid Heinemeier Hansson <david@loudthinking.com>2012-01-27 20:41:37 +0100
commit66b445c319a217df2c0ac94f55760594aab63600 (patch)
tree1634e96808281d7c556fde9c4c704e5e50c35c6c /activesupport/lib/active_support/cache.rb
parent2e5ec3b3996231c3b770844608fb7b41c0d891e6 (diff)
downloadrails-66b445c319a217df2c0ac94f55760594aab63600.tar.gz
rails-66b445c319a217df2c0ac94f55760594aab63600.tar.bz2
rails-66b445c319a217df2c0ac94f55760594aab63600.zip
Revert "Fix expanding cache key for single element arrays"
This reverts commit abe915f23777efe10f17d611bf5718ca855a0704. This broke all existing keys and it's wrong anyway. The array is just there as a convenience option for building the string. It's intentional that [ "stuff"] and "stuff" generates the same key.
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 1a152c68df..5afc92059c 100644
--- a/activesupport/lib/active_support/cache.rb
+++ b/activesupport/lib/active_support/cache.rb
@@ -91,7 +91,7 @@ module ActiveSupport
def retrieve_cache_key(key)
case
when key.respond_to?(:cache_key) then key.cache_key
- when key.is_a?(Array) then ['Array', *key.map { |element| retrieve_cache_key(element) }].to_param
+ when key.is_a?(Array) then key.map { |element| retrieve_cache_key(element) }.to_param
else key.to_param
end.to_s
end