Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
ObjectSpace::WeakMap#each_pair
each_pair
weakmap.c
View on GitHub ↗
static VALUE
wmap_each(VALUE self)
{
struct weakmap *w;
TypedData_Get_Struct(self, struct weakmap, &weakmap_type, w);
wmap_foreach(w, wmap_each_i, (st_data_t)0);
return self;
}
Alias of #each
Iterates over keys and values. Note that unlike other collections, each without block isn’t supported.