We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8c665c commit bc92c93Copy full SHA for bc92c93
lib/fileutils.rb
@@ -1274,8 +1274,15 @@ def door?
1274
def entries
1275
opts = {}
1276
opts[:encoding] = ::Encoding::UTF_8 if fu_windows?
1277
- Dir.children(path, opts)\
1278
- .map {|n| Entry_.new(prefix(), join(rel(), n.untaint)) }
+
+ files = if Dir.respond_to?(:children)
1279
+ Dir.children(path, opts)
1280
+ else
1281
+ Dir.entries(path(), opts)
1282
+ .reject {|n| n == '.' or n == '..' }
1283
+ end
1284
1285
+ files.map {|n| Entry_.new(prefix(), join(rel(), n.untaint)) }
1286
end
1287
1288
def stat
0 commit comments