Fixes a bug where spot was using the wrong local variable.
We want to use error highlight with code that has been eval'd, specifically ERB templates. We can recover the compiled source code of the ERB template but we need an API to pass the node into error highlight's spot.
Thanks! Could you please guard the new test with if defined?(RubyVM::AbstractSyntaxTree.node_id_for_location) or something to prevent the failure on Ruby 3.1?
Fixes a bug where
spot
was using the wrong local variable.We want to use error highlight with code that has been eval'd, specifically ERB templates. We can recover the compiled source code of the ERB template but we need an API to pass the node into error highlight's
spot
.Required Ruby PR: https://github.com/ruby/ruby/pull/6593
Co-authored-by: Aaron Patterson tenderlove@ruby-lang.org