From 82ae35719c99c5cbfa9888c9645c525950c08cba Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Fri, 3 Nov 2017 10:15:22 -0700 Subject: Dir.exists? -> Dir.exist? to avoid warning in rspec Avoids several annoying lines of warnings Signed-off-by: Tim Smith --- chef-config/lib/chef-config/path_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chef-config/lib/chef-config/path_helper.rb b/chef-config/lib/chef-config/path_helper.rb index e8a576c84f..c011c4f18a 100644 --- a/chef-config/lib/chef-config/path_helper.rb +++ b/chef-config/lib/chef-config/path_helper.rb @@ -235,7 +235,7 @@ module ChefConfig paths = paths.map { |home_path| home_path.gsub(path_separator, ::File::SEPARATOR) if home_path } # Filter out duplicate paths and paths that don't exist. - valid_paths = paths.select { |home_path| home_path && Dir.exists?(home_path.force_encoding("utf-8")) } + valid_paths = paths.select { |home_path| home_path && Dir.exist?(home_path.force_encoding("utf-8")) } valid_paths = valid_paths.uniq # Join all optional path elements at the end. -- cgit v1.2.1