method
new
new(orig)
public
Hide source
# File lib/weakref.rb, line 41 def initialize(orig) @__id = orig.object_id ObjectSpace.define_finalizer orig, @@final ObjectSpace.define_finalizer self, @@final @@mutex.synchronize { @@id_map[@__id] = [] unless @@id_map[@__id] } @@id_map[@__id].push self.object_id @@id_rev_map[self.object_id] = @__id super end