Method: Weak::Map#delete
- Defined in:
- lib/weak/map.rb
permalink #delete(key = UNDEFINED) {|key| ... } ⇒ Object?
Note:
Weak::Map does not test member equality with ‘==` or `eql?`. Instead, it always checks strict object equality, so that, e.g., different String keys are not considered equal, even if they may contain the same content.
Deletes the key-value pair and returns the value from ‘self` whose key is equal to `key`. If the key is not found, it returns `nil`. If the optional block is given and the key is not found, pass in the key and return the result of the block.
|
# File 'lib/weak/map.rb', line 236
|