From: Roger Pack Date: 2008-06-26T09:59:30+09:00 Subject: how to write in the middle of a file Greetings all. For some reason the answer to this stumps me. Say I have an existing file, 1K long, and I want to write something right in the middle of it, without changing the file size. I would have thought that a = File.open 'file', 'a+' a.seek 500 a.write 'abc' a.close would work but doesn't seem to. Thoughts? -R -- Posted via http://www.ruby-forum.com/.