diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-08-17 08:31:02 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-08-17 08:31:02 +0000 |
| commit | 68c253043a6245dd9607eeb8a03b3cf07fa56c2a (patch) | |
| tree | d84103244e9bebcfedefc67ac8f08ad6f0e77c73 /io.c | |
| parent | 6aac2506bcb9ad142dc8a77793a50923ff36999e (diff) | |
| download | ruby-68c253043a6245dd9607eeb8a03b3cf07fa56c2a.tar.gz ruby-68c253043a6245dd9607eeb8a03b3cf07fa56c2a.tar.xz ruby-68c253043a6245dd9607eeb8a03b3cf07fa56c2a.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/branches/ruby_1_8@6780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
| -rw-r--r-- | io.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3155,6 +3155,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)) { @@ -3178,7 +3179,6 @@ rb_io_reopen(argc, argv, file) fclose(fptr->f2); fptr->f2 = 0; } - return file; } |
