diff --git a/ChangeLog b/ChangeLog index 65166c5182..d55aa0e606 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Jan 28 11:23:54 2011 KOSAKI Motohiro + + * io.c (rb_io_open): Use NUM2MODET() instead NUM2UINT(). + * io.c (rb_scan_open_args): ditto. + Fri Jan 28 10:58:20 2011 KOSAKI Motohiro * configure.in: Added mode_t type checking. diff --git a/io.c b/io.c index eafec788e5..17784588bb 100644 --- a/io.c +++ b/io.c @@ -5420,7 +5420,7 @@ rb_scan_open_args(int argc, VALUE *argv, rb_io_extract_modeenc(&vmode, &vperm, opt, &oflags, &fmode, convconfig_p); - perm = NIL_P(vperm) ? 0666 : NUM2UINT(vperm); + perm = NIL_P(vperm) ? 0666 : NUM2MODET(vperm); *fname_p = fname; *oflags_p = oflags; @@ -5696,7 +5696,7 @@ rb_io_open(VALUE filename, VALUE vmode, VALUE vperm, VALUE opt) mode_t perm; rb_io_extract_modeenc(&vmode, &vperm, opt, &oflags, &fmode, &convconfig); - perm = NIL_P(vperm) ? 0666 : NUM2UINT(vperm); + perm = NIL_P(vperm) ? 0666 : NUM2MODET(vperm); if (!NIL_P(cmd = check_pipe_command(filename))) { return pipe_open_s(cmd, rb_io_oflags_modestr(oflags), fmode, &convconfig);