From 2a618daa1ed8e0cc42881ef4c5d43b5466b56b1a Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Wed, 13 Sep 2023 10:30:57 +0200 Subject: [PATCH] Eliminate unnecessary condition when eager loading This condition is a leftover from a previous implementation based on a recursive require. It is now unnecessary because shadowed files get no autoloads. --- lib/zeitwerk/loader/eager_load.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/zeitwerk/loader/eager_load.rb b/lib/zeitwerk/loader/eager_load.rb index ae68907a..6f864f4f 100644 --- a/lib/zeitwerk/loader/eager_load.rb +++ b/lib/zeitwerk/loader/eager_load.rb @@ -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