> I'm new to ruby so perhaps I'm simply doing this wrong, but...
This is more of a Windows thing than a Ruby thing.
> File.new(TEST_FILE_1,File::CREAT,0666)
Underneath the covers this opens a handle to the file. Until that
handle is closed, no one else can do anything to it. The GC will
eventually get it. But probably not before your call to rm_rf
> system("ruby -e 'File.new(\"" + TEST_FILE_2 + "\",File::CREAT)'")
This works because when the process ends, the Ruby GC is probably
called. If it isn't, then Windows will clean up the misbehaving
process.
--
Justin Rudd
http://seagecko.org/thoughts/