diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-08-17 09:02:40 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-08-17 09:02:40 +0000 |
commit | 613f7c56f789762d3fabfd92ca7c16e00bae8415 (patch) | |
tree | 922299c561755f4a987420495fbf1392ef7ea1cc /io.c | |
parent | 9c4cc1d1ef45f995ebd728d821352bb6224e3929 (diff) | |
download | ruby-613f7c56f789762d3fabfd92ca7c16e00bae8415.tar.gz ruby-613f7c56f789762d3fabfd92ca7c16e00bae8415.tar.xz ruby-613f7c56f789762d3fabfd92ca7c16e00bae8415.zip |
* io.c (rb_io_reopen): should clear allocated OpenFile. pointed
out by Guy Decoux. [ruby-core:03288]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@6781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3369,6 +3369,7 @@ rb_io_reopen(argc, argv, file) fptr = RFILE(file)->fptr; if (!fptr) { fptr = RFILE(file)->fptr = ALLOC(OpenFile); + MEMZERO(fptr, OpenFile, 1); } if (!NIL_P(nmode)) { @@ -3392,7 +3393,6 @@ rb_io_reopen(argc, argv, file) fclose(fptr->f2); fptr->f2 = 0; } - return file; } |