lib/ref/abstract_reference_key_map.rb
def []=(key, value)
      ObjectSpace.define_finalizer(key, @reference_cleanup)
      @lock.synchronize do
        @references_to_keys_map[key.__id__] = self.class.reference_class.new(key)
        @values[key.__id__] = value
      end
    end
def []=(key, value)
      ObjectSpace.define_finalizer(key, @reference_cleanup)
      @lock.synchronize do
        @references_to_keys_map[key.__id__] = self.class.reference_class.new(key)
        @values[key.__id__] = value
      end
    end
Add a key/value to the map.