From 5cceb31e5f575b4390e0757683adcd8c2172b66f Mon Sep 17 00:00:00 2001 From: Kaiyuan Ma Date: Tue, 19 May 2026 11:20:39 -0500 Subject: [PATCH] fixed file reference --- lib/annotate_rb/model_annotator/zeitwerk_class_getter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/annotate_rb/model_annotator/zeitwerk_class_getter.rb b/lib/annotate_rb/model_annotator/zeitwerk_class_getter.rb index 86fb1a97..b7a36dce 100644 --- a/lib/annotate_rb/model_annotator/zeitwerk_class_getter.rb +++ b/lib/annotate_rb/model_annotator/zeitwerk_class_getter.rb @@ -49,7 +49,7 @@ def constant(loader) # once we have the filepath_relative_to_root_dir, we need to see if it # falls within one of our Zeitwerk "collapsed" paths. - if loader.collapse.any? { |path| path.include?(root_dir) && file.include?(path.split(root_dir)[1]) } + if loader.collapse.any? { |path| path.include?(root_dir) && @file.include?(path.split(root_dir)[1]) } # if the file is within a collapsed path, we then need to, for each # collapsed path, remove the root dir collapsed = loader.collapse.map { |path| path.split(root_dir)[1].sub(/^\//, "") }.to_set