Skip to content

Commit

Permalink
Eliminate unnecessary condition when eager loading
Browse files Browse the repository at this point in the history
This condition is a leftover from a previous implementation based on a
recursive require.

It is now unnecessary because shadowed files get no autoloads.
  • Loading branch information
fxn committed Sep 13, 2023
1 parent fd33372 commit 2a618da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/zeitwerk/loader/eager_load.rb
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def load_file(path)
next if honour_exclusions && eager_load_exclusions.member?(abspath)

if ruby?(abspath)
if (cref = autoloads[abspath]) && !shadowed_file?(abspath)
if (cref = autoloads[abspath])
cget(*cref)
end
else
Expand Down

0 comments on commit 2a618da

Please sign in to comment.