Rubyists: stop using ObjectSpace._id2ref! It's not even safe to use on MRI/CRuby because it tries to reconstitute objects based on a pointer address in the GC heap (obj.object_id). JRuby does not support it out of the box.
-
-
Funny thing, isn't it?
@yukihiro_matz has said he considers it internal in the past, but docs don't say so and people still use it. Both object_id and id2ref need to go away. -
The holy cow of backwards compatibility keeps bad APIs in Ruby alive for too long. Dynlangs are biased to additions, as the cost of a breaking change is higher on users, there is no typechecker to find all the call sides users have to adapt.
- 3 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.