-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
enhancementNew feature or requestNew feature or request
Description
With the constant ::Foo::Bar::Spam
we look for these files on all load paths:
foo/bar/spam.rb
foo/bar.rb
foo.rb
The first of those to exist is the file that defines the constant. If it's an exact match, we can guarantee a match (in any sane, Ruby app). This may not be correct for (2) or (3) though, if both exist.
This potentially gets even more confusing when we consider things that are loaded via require
in paths that reflect a similar structure as autoload paths. Unit tests, for example, can often fit the same hierarchical structure as their counterparts.
Let's look into how we can either a) not make any assumptions and avoid false positives, or b) another solution that completely avoids false positives.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request