summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-28 02:23:58 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-28 02:23:58 +0000
commit4afa5fead876c3b732bb7bba3674231704b9df96 (patch)
tree17660cc79673ef68451c6cf40d440902d6749304 /io.c
parent92c1dfd9d2b3680c156a4657e3f44a956dc834e0 (diff)
* 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
Diffstat (limited to 'io.c')
-rw-r--r--io.c4
1 files changed, 2 insertions, 2 deletions
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);