e$B$3$s$K$A$O!"$J$+$`$ie(B(e$B$&e(B)e$B$G$9!#e(B
io.ce$B$NCf$G!“e(Bopen()e$B$K:G=E$KEO$5$l$ke(Bmodee$B$re(BNUM2INTe$B$G@8@.$7$F$$e(B
e$B$k$H$3$m$,?t2U=j$”$k$N$G$9$,!"e(Bmodee$B$,e(Bunsigned
inte$B$J4D6-$G:G>ee(B
e$B0L%S%C%H$^$G;H$C$F$$$k>l9g$K%(%i!<$K$J$C$F$7$^$$$^$9!#e(B
Index: io.c
— io.c (revision 16865)
+++ io.c (working copy)
@@ -4017,7 +4017,8 @@ rb_open_file(int argc, VALUE *argv, VALU
{
VALUE fname, vmode, perm;
const char *mode;
- int flags, fmode;
-
int flags;
-
unsigned int fmode;
rb_scan_args(argc, argv, “12”, &fname, &vmode, &perm);
FilePathValue(fname);
@@ -4030,7 +4031,7 @@ rb_open_file(int argc, VALUE *argv, VALU
SafeStringValue(vmode);
flags = rb_io_mode_modenum(StringValueCStr(vmode));
}
- fmode = NIL_P(perm) ? 0666 : NUM2INT(perm);
-
fmode = NIL_P(perm) ? 0666 : NUM2UINT(perm);
rb_file_sysopen_internal(io, RSTRING_PTR(fname), flags, fmode);
}
@@ -4082,7 +4083,8 @@ static VALUE
rb_io_s_sysopen(int argc, VALUE *argv)
{
VALUE fname, vmode, perm;
- int flags, fmode, fd;
-
int flags, fd;
-
unsigned int fmode;
char *path;rb_scan_args(argc, argv, “12”, &fname, &vmode, &perm);
@@ -4095,7 +4097,7 @@ rb_io_s_sysopen(int argc, VALUE *argv)
flags = rb_io_mode_modenum(StringValueCStr(vmode));
}
if (NIL_P(perm)) fmode = 0666;
- else fmode = NUM2INT(perm);
-
else fmode = NUM2UINT(perm);
RB_GC_GUARD(fname) = rb_str_new4(fname);
path = RSTRING_PTR(fname);
e$B87L)$J$3$H$r8@$&$H!"e(Bmodee$B$Oe(Bmode_te$B$G07$&$Y$-5$$b$7$^$9$,e(B…
e$B$=$l$G$O!#e(B