From: Skeets Date: 2006-07-30T15:45:05+09:00 Subject: Re: How to Create a New File thanks, everyone. Harold's solution works. i tried this before posting, but got an error. i guess i mucked up the code, b/c it works fine now. thanks again. Harold Hausman wrote: > How about something like this: > > File.open( 'new_file.txt', 'w' ) {|file| file.write( 'yo' )} > > #hth, > # -Harold > > On 7/30/06, Skeets wrote: > > let's say I want to create a new file named new_file.txt. how do i do > > this in ruby? it would seem to be trivial, however, i'm going through > > the pickaxe book and i can't find anything that relates to this. > > > > tia... > > > > > >