instead of triggering 'Permission denied @ dir_initialize - (Errno::EACCES)' by attempting to list an ancestor directory for which we don't have sufficient permissions.
# Will never raise 'Errno::EACCES'.
Pathname.pwd.ascend { |d| p d }
# Can raise 'Errno::EACCES' as nothing guarantees that we have enough
# permissions to list every ancestor directory of our working directort.
Pathname.pwd.ascend { |d| p d.children }
…file
instead of triggering 'Permission denied @ dir_initialize - (Errno::EACCES)' by attempting to list an ancestor directory for which we don't have sufficient permissions.