Hi,

At Fri, 21 May 2004 15:38:00 +0900,
Simon Strandgaard wrote in [ruby-talk:100979]:
> I just applied your patch.. it seems as the position now 
> gets zeroed.

Sorry, too stupid.


Index: io.c =================================================================== RCS file: /cvs/ruby/src/ruby/io.c,v retrieving revision 1.274 diff -u -2 -p -r1.274 io.c --- io.c 8 May 2004 08:11:33 -0000 1.274 +++ io.c 21 May 2004 06:55:56 -0000 @@ -3332,4 +3332,5 @@ rb_io_init_copy(dest, io) fd = ruby_dup(fileno(orig->f)); fptr->f = rb_fdopen(fd, mode); + fseeko(fptr->f, ftello(orig->f), SEEK_SET); if (orig->f2) { if (fileno(orig->f) != fileno(orig->f2)) { @@ -3337,4 +3338,5 @@ rb_io_init_copy(dest, io) } fptr->f2 = rb_fdopen(fd, "w"); + fseeko(fptr->f2, ftello(orig->f2), SEEK_SET); } if (fptr->mode & FMODE_BINMODE) {
-- Nobu Nakada