Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
ErrorHighlight::Spotter#spot_lambda
spot_lambda
lib/error_highlight/base.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/error_highlight/base.rb, line 716
def spot_lambda
fetch_line(@node.first_lineno)
if @snippet.match(/\G->/, @node.first_column)
@beg_column = $~.begin(0)
@end_column = $~.end(0)
end
end
Example:
-> { ... }
^^
See also
#spot_iter
#spot_op_asgn1_for_args
#spot_fcall_for_name
#spot_op_asgn1_for_name
also in
4.0