End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
GDBM#closed?
gdbm.closed? → true or false
ext/gdbm/gdbm.c
View on GitHub ↗
static VALUE
fgdbm_closed(VALUE obj)
{
struct dbmdata *dbmp;
TypedData_Get_Struct(obj, struct dbmdata, &dbm_type, dbmp);
if (dbmp->di_dbm == 0)
return Qtrue;
return Qfalse;
}
Returns true if the associated database file has been closed.