From: ChrisH Date: 2006-03-25T02:08:52+09:00 Subject: Re: Trouble with open/write/close cycle Toby DiPasquale wrote: > From above: > > - f = File.open 'crapper', 'w' > + f = File.open 'junk', 'w' > > Sorry. Not a problem. When I run your snippet i get: >ruby -w fwrite-test.rb 0 11 22 33 44 55 66 77 88 99 It looks like seeking on an empty file fills it with null data. Not sure if thats a Ruby thing or a feature of the underlying IO libs. change the 'w' to an 'a' (an delete the current 'junk' file) and the file produced looks like: 012345678 012345678 012345678 012345678 012345678 012345678 012345678 012345678 012345678 012345678 cheers