I asked Codex to analyze how stable are `node_id` across Prism versions and the answer is it's not stable: https://gist.github.com/eregon/469e40f447f6edac813a389e7f3f4832 One interesting fact is that `node_id` tracks the internal nod...Eregon (Benoit Daloze)
From our discussion with @mame and @matz at RubyKaigi in Hakodate, I recall Matz said if we add `#ast`/`#syntax_tree` and that returns a `Prism::Node`, then `prism` should define that method. And given we already have `Prism.find`, that...Eregon (Benoit Daloze)
## Motivation The main motivation is to be able to implement `Prism.find(Thread::Backtrace::Location)` precisely and cleanly on any Ruby implementation, in a way which does not depend on implementation details like `node_id`. For th...Eregon (Benoit Daloze)
PR is ready: https://github.com/ruby/ruby/pull/17963 Would appreciate some reviews :) --- sophiathedev (Nguyen Thang) wrote in #note-2: > This is my first time contributing to Ruby core. I've submitted a PR to fix this issue here...Eregon (Benoit Daloze)
mame (Yusuke Endoh) wrote in #note-27: > That said, it is also an unshakable fact that perfect behavior is hard to guarantee with a different version of prism. Yes, as I have shown above it is incorrect in some cases and as more time...Eregon (Benoit Daloze)
nobu (Nobuyoshi Nakada) wrote in #note-1: > `ObjectSpace._id2ref` does not guarantee the reference to the object, so it can happen of course. There is clear regression here in Ruby 4.0, before `ObjectSpace._id2ref` was safe and would...Eregon (Benoit Daloze)
In CRuby implementation terms we'd get the original method module with something like: ```c const rb_callable_method_entry_t *me = cme; // (1) unwrap an explicit alias entry, if present while (me->def->type == VM_METHOD_TYPE_ALIAS) { m...Eregon (Benoit Daloze)
```ruby class Parent def original puts caller_locations(0), nil end end class Child < Parent alias_method :alias, :original end Child.new.alias module Original def original puts caller_locations(0) en...Eregon (Benoit Daloze)