Hal.....Possible memory bug in Ruby? I'm stumped!


(Kurt Euler) #1

Thanks all! Works great!!!

-ke

···

-----Original Message-----
From: Hal E. Fulton [mailto:hal9000@hypermetrics.com]
Sent: Sunday, June 09, 2002 9:16 PM
To: ruby-talk@ruby-lang.org
Subject: Re: Hal…Possible memory bug in Ruby? I’m stumped!

----- Original Message -----
From: “Dossy” dossy@panoptic.com
To: “ruby-talk ML” ruby-talk@ruby-lang.org
Sent: Sunday, June 09, 2002 11:06 PM
Subject: Re: Hal…Possible memory bug in Ruby? I’m stumped!

On 2002.06.10, Kurt Euler keuler@portal.com wrote:

I just tried the line you recommended way below. I got this error:

t8.rb:25 undefined method ‘write’ for #Object:0x2e99610
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

Quite right. Thanks Dossy…

Hal Fulton