From c539c684aa0fc08769304746e1702aa1b4ddd4c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Thu, 12 Sep 2013 11:32:45 -0700 Subject: Merge pull request #12196 from h-lame/fix-activesupport-cache-filestore-cleanup Fix FileStore#cleanup to no longer rely on missing each_key method Conflicts: activesupport/CHANGELOG.md activesupport/test/caching_test.rb --- activesupport/lib/active_support/cache/file_store.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'activesupport/lib/active_support') diff --git a/activesupport/lib/active_support/cache/file_store.rb b/activesupport/lib/active_support/cache/file_store.rb index 9460532af0..c8003650e6 100644 --- a/activesupport/lib/active_support/cache/file_store.rb +++ b/activesupport/lib/active_support/cache/file_store.rb @@ -29,7 +29,8 @@ module ActiveSupport def cleanup(options = nil) options = merged_options(options) - each_key(options) do |key| + search_dir(cache_path) do |fname| + key = file_path_key(fname) entry = read_entry(key, options) delete_entry(key, options) if entry && entry.expired? end -- cgit v1.2.3