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