summaryrefslogtreecommitdiff
path: root/lib/chef/chef_fs/file_pattern.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/chef_fs/file_pattern.rb')
-rw-r--r--lib/chef/chef_fs/file_pattern.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/chef_fs/file_pattern.rb b/lib/chef/chef_fs/file_pattern.rb
index 48e28ccc39..f4889fbd86 100644
--- a/lib/chef/chef_fs/file_pattern.rb
+++ b/lib/chef/chef_fs/file_pattern.rb
@@ -126,7 +126,7 @@ class Chef
# abc/*def.exact_path == 'abc/def'
# abc/x\\yz.exact_path == 'abc/xyz'
def exact_path
- return nil if has_double_star || exact_parts.any? { |part| part.nil? }
+ return nil if has_double_star || exact_parts.any?(&:nil?)
result = Chef::ChefFS::PathUtils.join(*exact_parts)
is_absolute ? Chef::ChefFS::PathUtils.join("", result) : result