From: Robert Klemme Date: 2013-04-09T00:01:54+09:00 Subject: Re: Writing to an open IO stream from a method. --14dae9399b034843b804d9dab7d9 Content-Type: text/plain; charset=ISO-8859-1 On Mon, Apr 8, 2013 at 4:35 PM, Yancy B. wrote: > Robert Klemme wrote in post #1104870: > >...it's more likely that it has to do with the fact that you do not close > the > file handle properly. > > This is not the complete code. I close the file further down, as I had > more things to write to it. Good. Still, the block form is superior because it ensures closing of the stream under all conditions (even exceptions). > The problem was that the stream was not > being sent to the method and instead I was getting an error. But it's > working now anyway, thanks. Ah, glad you found it. Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/ --14dae9399b034843b804d9dab7d9 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable



--14dae9399b034843b804d9dab7d9--