Method: Weak::Map::AbstractStrongKeys#values

Defined in:
lib/weak/map/abstract_strong_keys.rb

#valuesArray

Note:

In contrast to a Hash, Weak::Maps do not necessarily retain insertion order.

Returns an Array containing all values of the map for which we have a valid key. Values with garbage-collected keys are excluded.

Returns:

  • (Array)

    an Array containing all values of the map for which we have a valid key. Values with garbage-collected keys are excluded.

See Also:



30
31
32
# File 'lib/weak/map/abstract_strong_keys.rb', line 30

def values
  each_value.to_a
end