mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d381c13410
commit
1ec4d9d3e4
1 changed files with 1 additions and 5 deletions
4
io.c
4
io.c
|
@ -1681,11 +1681,7 @@ rb_file_s_open(argc, argv, klass)
|
|||
Check_SafeStr(fname);
|
||||
path = RSTRING(fname)->ptr;
|
||||
|
||||
if (RFILE(io)->fptr) {
|
||||
rb_io_close_m(io);
|
||||
free(RFILE(io)->fptr);
|
||||
RFILE(io)->fptr = 0;
|
||||
}
|
||||
if (FIXNUM_P(vmode)) {
|
||||
int flags = NUM2INT(vmode);
|
||||
int fmode = NIL_P(perm) ? 0666 : NUM2INT(perm);
|
||||
|
|
Loading…
Reference in a new issue