From: "Ball, Donald A Jr (Library)" Date: 2007-06-14T06:07:55+09:00 Subject: Re: Learn to Program, by Chris Pine > -----Original Message----- > From: list-bounce@example.com > [mailto:list-bounce@example.com] On Behalf Of Tm Bo > Sent: Wednesday, June 13, 2007 4:04 PM > To: ruby-talk ML > Subject: Re: Learn to Program, by Chris Pine > > Hello all. Thanks to all the posters who came before me! > You've been tremendous help. I have a quick question on > Chapter 11 - Reading and Writing, Section 11.3: > > > file_name = 'TestFile.txt' > test_string = 'Nothing!' > > File.open file_name, 'w' do |f| > f.write test_string > end > > read_string = File.read file_name > puts(read_string == test_string) > > > I poked around the web, but I can't find out what the 'w' is > for. Can anyone shed any light? Muchas gracias in advance. http://dev.rubycentral.com/ref/ref_c_file.html#open the 'w' option opens the file for writing. - donald