End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
GDBM#delete
gdbm.delete(key) → value or nil
ext/gdbm/gdbm.c
View on GitHub ↗
static VALUE
fgdbm_delete(VALUE obj, VALUE keystr)
{
VALUE valstr;
valstr = fgdbm_fetch(obj, keystr, Qnil);
rb_gdbm_delete(obj, keystr);
return valstr;
}
Removes the key-value-pair with the specified key from this database and returns the corresponding value. Returns nil if the database is empty.