Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Hash#value?
(V arg0) -> bool
hash.value?(value) → true or false
hash.c
View on GitHub ↗
static VALUE
rb_hash_has_value(VALUE hash, VALUE val)
{
VALUE data[2];
data[0] = Qfalse;
data[1] = val;
rb_hash_foreach(hash, rb_hash_search_value, (VALUE)data);
return data[0];
}
Alias of #has_value?
Returns true if value is a value in self, otherwise false.