Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
ObjectSpace::WeakMap#each_value
map.each_value {|val| ... } → self
weakmap.c
View on GitHub ↗
static VALUE
wmap_each_value(VALUE self)
{
struct weakmap *w;
TypedData_Get_Struct(self, struct weakmap, &rb_weakmap_type, w);
st_foreach(w->table, wmap_each_value_i, (st_data_t)0);
return self;
}
Iterates over values. Note that unlike other collections, each_value without block isn’t supported.