diff options
Diffstat (limited to 'lib/chef/chef_fs/path_utils.rb')
-rw-r--r-- | lib/chef/chef_fs/path_utils.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/chef_fs/path_utils.rb b/lib/chef/chef_fs/path_utils.rb index 4de23f8266..59219a04be 100644 --- a/lib/chef/chef_fs/path_utils.rb +++ b/lib/chef/chef_fs/path_utils.rb @@ -115,7 +115,7 @@ class Chef return nil unless PathUtils.os_path_eq?(candidate_fragment, ancestor) if ancestor.length == path.length "" - elsif path[ancestor.length, 1] =~ /#{PathUtils.regexp_path_separator}/ + elsif path[ancestor.length, 1].match?(/#{PathUtils.regexp_path_separator}/) path[ancestor.length + 1..-1] else nil |