Method: Weak::Set#add
- Defined in:
- lib/weak/set.rb
permalink #add(obj) ⇒ self Also known as: <<
Adds the given object to the weak set and return self
. Use #merge to
add many elements at once.
In contrast to other "regular" objects, we will not retain a strong reference to the added object. Unless some other live objects still references the object, it will eventually be garbage-collected.
|
# File 'lib/weak/set.rb', line 181
|