Skip to content

Commit

Permalink
Prefer Dir.each_child over Dir.children
Browse files Browse the repository at this point in the history
  • Loading branch information
fxn committed Oct 7, 2024
1 parent 5c41151 commit de71d88
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/zeitwerk/loader/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ module Zeitwerk::Loader::Helpers
to_visit = [dir]

while (dir = to_visit.shift)
children = Dir.children(dir)

children.each do |basename|
Dir.each_child(dir) do |basename|
next if hidden?(basename)

abspath = File.join(dir, basename)
Expand Down

0 comments on commit de71d88

Please sign in to comment.