summaryrefslogtreecommitdiff
path: root/lib/chef/file_cache.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/file_cache.rb')
-rw-r--r--lib/chef/file_cache.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/file_cache.rb b/lib/chef/file_cache.rb
index 1955dbb165..2d4a56a91b 100644
--- a/lib/chef/file_cache.rb
+++ b/lib/chef/file_cache.rb
@@ -158,7 +158,7 @@ class Chef
# === Returns
# [String] - An array of file cache keys matching the glob
def find(glob_pattern)
- keys = Array.new
+ keys = []
Dir[File.join(Chef::Util::PathHelper.escape_glob_dir(file_cache_path), glob_pattern)].each do |f|
if File.file?(f)
keys << f[/^#{Regexp.escape(Dir[Chef::Util::PathHelper.escape_glob_dir(file_cache_path)].first) + File::Separator}(.+)/, 1]