summaryrefslogtreecommitdiffstats
path: root/ext/dbm
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-11-08 05:29:37 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-11-08 05:29:37 +0000
commit0104ca814205b03db79a3b0767186ccbc0dab40c (patch)
tree8a63998435ddc0a3367124967bf063f01e7cfbb9 /ext/dbm
parent56627c6963e27078e8007b6465725fc89bfcadf0 (diff)
downloadruby-0104ca814205b03db79a3b0767186ccbc0dab40c.tar.gz
ruby-0104ca814205b03db79a3b0767186ccbc0dab40c.tar.xz
ruby-0104ca814205b03db79a3b0767186ccbc0dab40c.zip
matz
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dbm')
-rw-r--r--ext/dbm/dbm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/dbm/dbm.c b/ext/dbm/dbm.c
index b1564793d..830a61680 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);
}