Saynatkari wrote: >I think #truncate simply memset()s the buffer but it does not >change the position of the file pointer, so you would probably >need to #seek 0, as well. > > rewind is slightly better than seek 0 -- Best regards, Alexey Verkhovsky Ruby Forum: http://ruby-forum.org (moderator) RForum: http://rforum.andreas-s.net (co-author) Instiki: http://instiki.org (maintainer)