End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
GDBM#replace
gdbm.replace(other) → gdbm
ext/gdbm/gdbm.c
View on GitHub ↗
static VALUE
fgdbm_replace(VALUE obj, VALUE other)
{
fgdbm_clear(obj);
rb_block_call(other, rb_intern("each_pair"), 0, 0, update_i, obj);
return obj;
}
Replaces the content of gdbm with the key-value pairs of other. other must have an each_pair method.