Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
ErrorHighlight::Spotter#spot_fcall_for_name
spot_fcall_for_name
lib/error_highlight/base.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/lib/error_highlight/base.rb, line 456
def spot_fcall_for_name
mid, _nd_args = @node.children
fetch_line(@node.first_lineno)
if @snippet.match(/(#{ Regexp.quote(mid) })/, @node.first_column)
@beg_column = $~.begin(1)
@end_column = $~.end(1)
end
end
Example:
foo(42) ^^^ foo 42 ^^^
See also
#spot_fcall_for_args
#spot_op_asgn1_for_args
#spot_colon2
#spot_op_asgn1_for_name
also in
4.1 · 4.0 · 3.3 · 3.2 · 3.1