Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
ObjectSpace::WeakKeyMap#key?
map.key?(key) → true or false
weakmap.c
View on GitHub ↗
static VALUE
wkmap_has_key(VALUE self, VALUE key)
{
return RBOOL(wkmap_lookup(self, key) != Qundef);
}
Returns true if key is a key in self, otherwise false.