summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-07-06 09:18:54 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-07-06 09:18:54 +0000
commit1ec4d9d3e47132a4eeacc1a45a9e0bf1159ab3c8 (patch)
treee8eb56bde600f93ec683186cf3cdbe4630d31513
parentd381c1341084cba3dac822fb720d005307ad9f54 (diff)
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--io.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/io.c b/io.c
index 6216a0d359c..9abffb95195 100644
--- a/io.c
+++ b/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;
- }
+ RFILE(io)->fptr = 0;
if (FIXNUM_P(vmode)) {
int flags = NUM2INT(vmode);
int fmode = NIL_P(perm) ? 0666 : NUM2INT(perm);