Preview Ruby 4.1 is a preview. It can change before the final release. 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-4.1.0-preview1/lib/error_highlight/base.rb, line 523
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_iter
#spot_defs
#spot_lambda
also in
4.0 · 3.4 · 3.3 · 3.2 · 3.1