aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--io.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index c82bf40e68..8760f5b29b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Tue Feb 8 16:04:03 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * io.c (rb_io_s_sysopen): use NUM2MODET() instead NUM2UINT().
+
Tue Feb 8 15:59:23 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* process.c (rb_run_exec_options_err): use MODET2NUM() instead LONG2NUM().
diff --git a/io.c b/io.c
index 89932953ef..a50159771c 100644
--- a/io.c
+++ b/io.c
@@ -5521,7 +5521,7 @@ rb_io_s_sysopen(int argc, VALUE *argv)
oflags = rb_io_modestr_oflags(StringValueCStr(vmode));
}
if (NIL_P(vperm)) perm = 0666;
- else perm = NUM2UINT(vperm);
+ else perm = NUM2MODET(vperm);
RB_GC_GUARD(fname) = rb_str_new4(fname);
fd = rb_sysopen(fname, oflags, perm);