For ```ruby l = -> x, y { x + y } l.call(1) ``` ErrorHighlight shows: ``` test.rb:1:in 'block in <main>': wrong number of arguments (given 1, expected 2) (ArgumentError) caller: test.rb:5 | l.call(1) ^^^^...Eregon (Benoit Daloze)
I was curious what's the reported location for `ArgumentError`s caused by lambda parameters and how ErrorHighlight highlights them. For ```ruby l = lambda { |x, y| x + y } l.call(1) ``` With `parse.y`, the node (`RubyVM::...Eregon (Benoit Daloze)
* In file included from /usr/include/string.h:535, from include/prism/internal/arena.h:12, from src/prism.c:6: In function 'memset', inlined from 'lex_mode_push_regexp' at src/prism.c:290:5: .../...Eregon (Benoit Daloze)
kddnewton (Kevin Newton) wrote in #note-21: > If, regardless, you would like to keep pursuing it, you need to produce working code for those two examples. Done: https://github.com/eregon/error_highlight/pull/1 https://github.com/er...Eregon (Benoit Daloze)
kddnewton (Kevin Newton) wrote in #note-23: > Unless you're once again suggesting we only rely on line/column, which as already mentioned multiple times and rejected multiple times, won't work. Do you have a concrete example why it w...Eregon (Benoit Daloze)
tikkss (Tsutomu Katsube) wrote in #note-1: > You might argue, "Why not run it in a multi-process?" However, > ... Did you measure the difference in memory usage? I'd expect it to be small because each Ruby::Box has pretty much a cop...Eregon (Benoit Daloze)
headius (Charles Nutter) wrote in #note-12: > The target of the break is a semantic detail, not a syntactic one, and it is not determined at parse time. It does, it is determined at parse time. Break is a syntactic construct. > .....Eregon (Benoit Daloze)
kddnewton (Kevin Newton) wrote in #note-21: > Further evidence that the ABI version is good: since the beginning of 2024, we would only have had to bump the ABI version twice. How did you determine this? As shown in #note-13, `node...Eregon (Benoit Daloze)
hsbt (Hiroshi SHIBATA) wrote in #note-3: > We already have a precedent where TruffleRuby CI for a library stayed broken for over a month with no one fixing it. > ... For the record, I did work hard on fixing that and the initial fix t...Eregon (Benoit Daloze)
I discussed this in detail with @mame and @matz. @mame (to reply here too) what I meant is using Prism with the `Method|UnboundMethod|Proc` and the `source_range` to find the Prism node, and then compute the max end offset by walking th...Eregon (Benoit Daloze)