From: Sebastian Hungerecker Date: 2008-05-11T21:34:35+09:00 Subject: Re: Erasing text from a file Lucas L. wrote: > Andrea Fazzi wrote: > > File.open('file.txt', 'w') { |file| file = nil } The "file = nil" part is completely unneccessary. You can just do File.open('file.txt', 'w') {} > Is there a way to do it without reopening? I don't think there is. HTH, Sebastian -- NP: Depeche Mode - Freestate Jabber: sepp2k@jabber.org ICQ: 205544826