----- Original Message ----- From: "Tim Sutherland" <timsuth / ihug.co.nz> Newsgroups: comp.lang.ruby To: "ruby-talk ML" <ruby-talk / ruby-lang.org> Sent: Monday, June 10, 2002 3:19 AM Subject: Re: Park and others!.....Possible memory bug in Ruby? I'm stumped! > In article <006001c2102e$5a7a4de0$0300a8c0 / austin.rr.com>, Hal E. Fulton wrote: > [...] > >But be aware that 'open' is essentially the same as 'new' except > >that it can take a block. If it's given a block, the file will > >be closed after the block is executed. > > > > File.open("./output/#{field[0]}", "w+") { write(content2) } > > # file is now closed > > You mean > File.open("./output/#{field[0]}", "w+") { |file| file.write(content2) } > > Also, the leading "./" is unnecessary. Right on both counts. Hal Fulton