Method: ObjectSpace::WeakMap#keys
- Defined in:
- weakmap.c
permalink #keys ⇒ Object
Returns a new Array containing all keys in the map.
401 402 403 404 405 406 407 408 409 410 411 |
# File 'weakmap.c', line 401
static VALUE
wmap_keys(VALUE self)
{
struct weakmap *w;
TypedData_Get_Struct(self, struct weakmap, &weakmap_type, w);
VALUE ary = rb_ary_new();
wmap_foreach(w, wmap_keys_i, (st_data_t)ary);
return ary;
}
|