Skip to content

Commit 1864b67

Browse files
committed
Constants strips leading namespace separators
1 parent ed3809f commit 1864b67

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/solargraph/api_map/constants.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def complex_resolve name, gates, internal
119119
resolved = simple_resolve(name, gate, internal)
120120
return [resolved, gates[(idx + 1)..]] if resolved
121121
store.get_ancestor_references(gate).each do |ref|
122-
return ref.name if ref.name.end_with?("::#{name}")
122+
return ref.name.sub(/^::/, '') if ref.name.end_with?("::#{name}")
123123
mixin = resolve(ref.name, ref.reference_gates - gates)
124124
next unless mixin
125125
resolved = simple_resolve(name, mixin, internal)

0 commit comments

Comments
 (0)