From: Charles Nutter Date: 2011-01-21T09:41:58+09:00 Subject: [ruby-core:34691] [Ruby 1.9-Bug#4168] WeakRef is unsafe to use in Ruby 1.9 Issue #4168 has been updated by Charles Nutter. Ok, I see why Brian's reference queue doesn't have the same restrictions as the JVM's: it isn't triggered by the reference, it's triggered by the finalizer attached to the object. There's a lot of other stuff here, so I'm not sure how much I ought to review. The basic comments I made above about your (Kurt) current patchset are good enough comments for now. And as I mentioned in previous comment, you can also use Weakling's feature set as a pretty good indication of the limitations of JVM weakreferences (and what we'd be able to support in a new official API). Matz: You said previously you'd like to see a new weak reference API added and the old weakref.rb allowed to die. Couldn't we also just make the new API be the backend for weakref.rb? Or is your intent to actually phase that library out (perhaps due to using Delegate, which most folks seem to agree is a bad idea for a weak reference). ---------------------------------------- http://redmine.ruby-lang.org/issues/show/4168 ---------------------------------------- http://redmine.ruby-lang.org