Skip to content

Commit 4dde9cb

Browse files
authored
Return early when following a non aliased name (#1073)
1 parent 589f55d commit 4dde9cb

File tree

1 file changed

+2
-0
lines changed
  • lib/ruby_indexer/lib/ruby_indexer

1 file changed

+2
-0
lines changed

lib/ruby_indexer/lib/ruby_indexer/index.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ def index_single(indexable_path, source = nil)
182182
# aliases, so we have to invoke `follow_aliased_namespace` again to check until we only return a real name
183183
sig { params(name: String).returns(String) }
184184
def follow_aliased_namespace(name)
185+
return name if @entries[name]
186+
185187
parts = name.split("::")
186188
real_parts = []
187189

0 commit comments

Comments
 (0)