Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
ObjectSpace::WeakMap#key?
map.key?(key) → true or false
weakmap.c
View on GitHub ↗
static VALUE
wmap_has_key(VALUE self, VALUE key)
{
return RBOOL(!UNDEF_P(wmap_lookup(self, key)));
}
Alias of #include?
Returns true if key is a key in self, otherwise false.