diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-05-20 04:33:59 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-05-20 04:33:59 +0000 |
| commit | 564e497f42fb88819cdee861000ae65bfa9c9f3f (patch) | |
| tree | 2439196595178f17e0ba3f94ed628fc8f09cb3ca /io.c | |
| parent | c77b5c71cd4f4f5ece6ceec539346056d3d1c11d (diff) | |
| download | ruby-564e497f42fb88819cdee861000ae65bfa9c9f3f.tar.gz ruby-564e497f42fb88819cdee861000ae65bfa9c9f3f.tar.xz ruby-564e497f42fb88819cdee861000ae65bfa9c9f3f.zip | |
* io.c (rb_io_clone): writing stream was not copied properly.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
| -rw-r--r-- | io.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -2227,11 +2227,11 @@ rb_io_clone(io) } fd = ruby_dup(fileno(orig->f)); fptr->f = rb_fdopen(fd, mode); - if (fptr->f2) { + if (orig->f2) { if (fileno(orig->f) != fileno(orig->f2)) { fd = ruby_dup(fileno(orig->f2)); } - fptr->f = rb_fdopen(fd, "w"); + fptr->f2 = rb_fdopen(fd, "w"); } if (fptr->mode & FMODE_BINMODE) { rb_io_binmode(clone); |
