1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2000-07-06 09:18:54 +00:00
parent d381c13410
commit 1ec4d9d3e4

6
io.c
View file

@ -1681,11 +1681,7 @@ rb_file_s_open(argc, argv, klass)
Check_SafeStr(fname); Check_SafeStr(fname);
path = RSTRING(fname)->ptr; path = RSTRING(fname)->ptr;
if (RFILE(io)->fptr) { RFILE(io)->fptr = 0;
rb_io_close_m(io);
free(RFILE(io)->fptr);
RFILE(io)->fptr = 0;
}
if (FIXNUM_P(vmode)) { if (FIXNUM_P(vmode)) {
int flags = NUM2INT(vmode); int flags = NUM2INT(vmode);
int fmode = NIL_P(perm) ? 0666 : NUM2INT(perm); int fmode = NIL_P(perm) ? 0666 : NUM2INT(perm);