diff --git a/lib/fileutils.rb b/lib/fileutils.rb index 74b21975e3..dc7261857b 100644 --- a/lib/fileutils.rb +++ b/lib/fileutils.rb @@ -1274,8 +1274,7 @@ module FileUtils def entries opts = {} opts[:encoding] = ::Encoding::UTF_8 if fu_windows? - Dir.entries(path(), opts)\ - .reject {|n| n == '.' or n == '..' }\ + Dir.children(path, opts)\ .map {|n| Entry_.new(prefix(), join(rel(), n.untaint)) } end