diff options
Diffstat (limited to 'ext/dbm/dbm.c')
-rw-r--r-- | ext/dbm/dbm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/dbm/dbm.c b/ext/dbm/dbm.c index b1564793d1..830a616804 100644 --- a/ext/dbm/dbm.c +++ b/ext/dbm/dbm.c @@ -76,14 +76,14 @@ fdbm_s_open(argc, argv, klass) dbm = dbm_open(RSTRING(file)->ptr, O_RDWR|O_CREAT, mode); } if (!dbm) { - mode = 0666; - dbm = dbm_open(RSTRING(file)->ptr, O_RDWR, mode); + dbm = dbm_open(RSTRING(file)->ptr, O_RDWR, 0); } if (!dbm) { - dbm = dbm_open(RSTRING(file)->ptr, O_RDONLY, mode); + dbm = dbm_open(RSTRING(file)->ptr, O_RDONLY, 0); } if (!dbm) { + printf("mode: %o\n", mode); if (mode == -1) return Qnil; rb_sys_fail(RSTRING(file)->ptr); } |