oracle / truffleruby

A high performance implementation of the Ruby programming language, built on GraalVM.
https://www.graalvm.org/ruby/
Other
3.02k stars 185 forks source link

TracePoint.new(:end) is not supported #3696

Open segiddins opened 4 days ago

segiddins commented 4 days ago

It is called on cruby when a class or module block is closed

andrykonchin commented 4 days ago

Thank you for the report, we'll look into it.

eregon commented 4 days ago

Do you need it for a particular gem or usage?

segiddins commented 3 days ago

Yes, joeldrapper/literal uses it to "freeze" classes once they're done being defined

eregon commented 3 days ago

Found it: https://github.com/joeldrapper/literal/blob/7f47ca228fd444d51696d4b4198e803c2069c1cb/lib/literal/enum.rb#L174-L180 Some thoughts on it: https://github.com/joeldrapper/literal/pull/93/files#r1814720822

joeldrapper commented 23 hours ago

@eregon thank you. I replied to your comments in the thread on the literal repo. I think we can just disable this feature for TruffleRuby. It’s not essential, it’s just nice to know that Enums are constant — defined once at boot and never updated during runtime.