Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
ErrorHighlight::Spotter#prism_spot_constant_path
prism_spot_constant_path
lib/error_highlight/base.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/lib/error_highlight/base.rb, line 805
def prism_spot_constant_path
if @node.parent && @node.parent.location.end_line == @node.location.end_line
fetch_line(@node.parent.location.end_line)
prism_location(@node.delimiter_loc.join(@node.name_loc))
else
fetch_line(@node.location.end_line)
location = @node.name_loc
location = @node.delimiter_loc.join(location) if @node.delimiter_loc.end_line == location.start_line
prism_location(location)
end
end
Example:
Foo::Bar ^^^^^