There have been new methods/classes in the last week like: `IO::Buffer#advance` https://github.com/ruby/ruby/pull/19122 `Introduce IO::Buffer::Storage and parent-relative slice views` https://github.com/ruby/ruby/pull/19186 I thin...Eregon (Benoit Daloze)
I think maybe the bigger issue here is that profiling a program using YJIT or ZJIT might give very misleading results, because the action of profiling itself (if the profiler uses postponed jobs and many do) has the unexpected side effec...Eregon (Benoit Daloze)
Draft of a potential fix: https://github.com/ruby/ruby/pull/18205 I have tried several things to avoid overhead on the the no-interrupt-path but they mostly failed, I guess the YJIT backend doesn't really support generating code with ...Eregon (Benoit Daloze)
Two more thoughts on this: 1. Should there be a `version:` keyword argument for `Ruby::Prism.parse(code, version:)`? Because the point of Ruby::Prism is to use the current version always. The default is actually `"latest"`, which by c...Eregon (Benoit Daloze)
Overall I think this is a great solution for making `#syntax_tree` reliable. I asked Claude to think about the consequences of introducing `Ruby::Prism`: --- It recreates the `ripper` / `parser` gem split. Code that parses the running...Eregon (Benoit Daloze)
I asked Claude about those questions. Re the 2 Prism C extensions, it's a non-issue because only `Init_prism` could conflict, and the interpreter resolves its `Init_prism` at link time, and the extension's init is resolved by `dlsym(exte...Eregon (Benoit Daloze)
How does this work for the Prism C extension? When having both `Ruby::Prism` and `Prism`, there are 2 "Prism C extensions" loaded and both define some C globals like `Init_prism` (EDIT: I originally wrote `rb_cPrism` but that's actually ...Eregon (Benoit Daloze)
+1, this definitely helps avoid many subtle bugs and simplifies the logic significantly (in fact I already advocated for this in previous tickets).Eregon (Benoit Daloze)
* This is more accurate than using the line and is a portable API between Ruby implementations. * I also tried to use #syntax_tree but that fails 2 tests as it returns the CallNode instead of BlockNode for blocks. Additionally, #syntax...Eregon (Benoit Daloze)