Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
ErrorHighlight::Spotter#spot_op_asgn2_for_args
spot_op_asgn2_for_args
lib/error_highlight/base.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/error_highlight/base.rb, line 632
def spot_op_asgn2_for_args
_nd_recv, _qcall, _attr, _op, nd_rhs = @node.children
if nd_rhs.first_lineno == nd_rhs.last_lineno
fetch_line(nd_rhs.first_lineno)
@beg_column = nd_rhs.first_column
@end_column = nd_rhs.last_column
end
end
Example:
x.foo += 42
^^
See also
#spot_op_asgn1_for_name
#spot_op_asgn2_for_name
#spot_op_asgn1_for_args
#spot_opcall_for_args
also in
4.0 · 3.4 · 3.3 · 3.2 · 3.1