----- Original Message ----- 
From: "Michael Campbell" <michael_s_campbell / yahoo.com>
To: "ruby-talk ML" <ruby-talk / ruby-lang.org>
Sent: Tuesday, July 30, 2002 9:19 AM
Subject: Style question


> Is there an accepted standard as to when to use {} vs do/end?

The nearest thing to a standard is this
(which I practice, and I think I got it
from the Pragmatic Programmers).

Use do-end for multi-line blocks and {}
for single lines.

Just a convention -- the language doesn't
require it.

On the other hand, there is a precedence 
issue with these two, so that sometimes
a statement will be interpreted differently
with these two constructs. It's a rare thing,
so I don't think it really trips anyone up.

I can't remember the details, but I think it's
in the FAQ.

Hal Fulton