From 4afa5fead876c3b732bb7bba3674231704b9df96 Mon Sep 17 00:00:00 2001 From: kosaki Date: Fri, 28 Jan 2011 02:23:58 +0000 Subject: [PATCH] * io.c (rb_io_open): Use NUM2MODET() instead NUM2UINT(). * io.c (rb_scan_open_args): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ io.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) 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);