On Wednesday 17 August 2005 12:08 am, Jamal Hansen wrote:
> On 8/16/05, len <lsumnler / gmail.com> wrote:
> > Is there some difference in the code I'm not seeing or is one better
> > than the other:
>
> I think it is a matter of preference / readability though they do the same
> thing. If your block is longer than one line the do/end version is
> preferred for readability. You can find this in the Poignant Guide <
> http://poignantguide.net/ruby> (which I recommend) in Chapter 3 under
> Blocks.

I'm a newbie, but I'm quite certain I've read that there is (was?) a 
difference between the two forms of block ( { } vs. ... end) with respect to 
scope of variables.  Not sure where I read that, but I've been doing reading 
online in many places (except the poignant guide) and dead trees Teach 
Yourself Ruby in 21 Days and the Pickaxe2.

It doesn't sound like a difference that will affect everyone all the time, but 
more one of those things that will bite you occasionally (sp?).

regards,
Randy Kramer