From: "list. rb" Date: 2008-10-21T22:24:59+09:00 Subject: Re: Ruby way to take some action only once in a loop? ------=_Part_2310_4526558.1224595580754 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Tue, Oct 21, 2008 at 9:05 AM, Lloyd Linklater wrote: > You do not say if the "do once" code must rely on something obtained in > the loop. If you will excuse me for a simplistic question, if you are > doing something like writing a header, why not do it before you even > start the loop? I dislike checking for a conditional every time a loop > runs. It sucks up CPU time unnecessarily. > -- > Posted via http://www.ruby-forum.com/. > > 1.times { puts 'hi' } ------=_Part_2310_4526558.1224595580754--