End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
ErrorHighlight::Spotter#spot_colon2
spot_colon2
lib/error_highlight/base.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/lib/error_highlight/base.rb, line 463
def spot_colon2
nd_parent, const = @node.children
if nd_parent.last_lineno == @node.last_lineno
fetch_line(nd_parent.last_lineno)
@beg_column = nd_parent.last_column
@end_column = @node.last_column
else
@snippet = @fetch[@node.last_lineno]
if @snippet[...@node.last_column].match(/#{ Regexp.quote(const) }\z/)
@beg_column = $~.begin(0)
@end_column = $~.end(0)
end
end
end
Example:
Foo::Bar ^^^^^
See also
#spot_call_for_name
#spot_fcall_for_args
#spot_call_for_args
#spot_fcall_for_name
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.1