General

Profile

Snappingturtle (Mike O'Sullivan)

  • Login: Snappingturtle
  • Registered on: 12/25/2019
  • Last sign in: 03/14/2020

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 1 0 1

Activity

01/02/2020

03:44 PM Ruby Feature #16471: Two feature requests for WeakRef: get original object, callback feature
I'd rather not pollute the target object's class with a finalizer. However, I'm working on a class, FinalCall, that can hold the target object. When the FinalCall object is garbage collected, it calls a callback. If anybody wants to cont... Snappingturtle (Mike O'Sullivan)
03:23 AM Ruby Feature #16471: Two feature requests for WeakRef: get original object, callback feature
`WeakRef#__getobj__` isn't documented in Ruby 2.5.1 (https://short.uno/wwb6bky) so I didn't know it existed. So I guess that's sort of a bug report right there.
I think I might be able to write a class that does the callback on garbage ...
Snappingturtle (Mike O'Sullivan)

01/01/2020

07:16 PM Ruby Feature #16471 (Open): Two feature requests for WeakRef: get original object, callback feature
I'd like to request two features for `WeakRef`. I'll explain what I want, then provide a real world use case.
First, add the ability to pull the original object out of the `WeakRef` object, something like this:
```ruby
myhash = {}...
Snappingturtle (Mike O'Sullivan)

Also available in: Atom