>>>>> "F" == Fritz Heinrichmeyer <fritz.heinrichmeyer / fernuni-hagen.de> writes:

F> Sorry for the noise, the dbm interface works, it only seems to insist on
F> filename ending in ".db". My file had no such ending, so dbm module
F> created a new empty database. Is this behavior built into the c library
F> or into the interface code (i know i could read the source)? 

 C library, the interface code just do :

    dbm = 0;
    if (mode >= 0) {
        dbm = dbm_open(RSTRING(file)->ptr, O_RDWR|O_CREAT, mode);
    }
    if (!dbm) {
        dbm = dbm_open(RSTRING(file)->ptr, O_RDWR, 0);
    }
    if (!dbm) {
        dbm = dbm_open(RSTRING(file)->ptr, O_RDONLY, 0);
    }

    if (!dbm) {
        if (mode == -1) return Qnil;
        rb_sys_fail(RSTRING(file)->ptr);
    }

 No test is made on the name of the file.



Guy Decoux