instance method
Set#delete?
(A) -> self?
delete?(obj) → self or nil
set.c
View on GitHub ↗
static VALUE
set_i_delete_p(VALUE set, VALUE item)
{
rb_check_frozen(set);
if (set_table_delete(RSET_TABLE(set), (st_data_t *)&item)) {
set_compact_after_delete(set);
return set;
}
return Qnil;
}
Deletes the given object from the set and returns self. If the object is not in the set, returns nil.
See also
#delete
#delete_if
#compare_by_identity?
#difference
also in
4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0