From: Dossy Date: 2002-06-10T13:06:53+09:00 Subject: Re: Hal.....Possible memory bug in Ruby? I'm stumped! On 2002.06.10, Kurt Euler wrote: > I just tried the line you recommended way below. I got this error: > > t8.rb:25 undefined method 'write' for # > from t8.rb:25:in 'open" > from t8.rb.25 > from t8.rb:14:in 'foreach' > from t8.rb:14 > > Thoughts? (My original line works ok, but I'd be interested in getting > yours to work for file-close-guarantee purposes.) Try this: File.open("./output/#{field[0]}", "w+") { |file| file.write(content2) } -- Dossy -- Dossy Shiobara mail: dossy@panoptic.com Panoptic Computer Network web: http://www.panoptic.com/ "He realized the fastest way to change is to laugh at your own folly -- then you can let go and quickly move on." (p. 70)