instance method
Set#delete
(A) -> self
delete(obj) → self
set.c
View on GitHub ↗
static VALUE
set_i_delete(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;
}
Deletes the given object from the set and returns self. Use subtract to delete many items at once.
See also
#delete?
#compare_by_identity?
#compare_by_identity
#delete_if
also in
4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0