From: Chris Richards Date: 2007-10-30T21:03:14+09:00 Subject: Re: Is there a better way to do this? (write something to a This isn't a file copy. I'm just writing data to a file. This is equivalent : File.open("/file/location/new.txt","w") {|file| file << "data to write"} > Hello -- > > On 30/10/2007, Chris Richards wrote: >> Is there a better way to write text to a file? >> >> File.open("/file/location/new.txt","w") {|file| file.write "data to >> write"} >> >> It just seems a bit long winded and unmessy > > File.copy in this instance, surely? > > -- Thomas Adam -- Posted via http://www.ruby-forum.com/.