David Alan Black <dblack / candle.superlink.net> writes:

> I'm just curious -- do you make that distinction automatically (single
> line use {}, multi line use do/end)?

Not speaking for Aleksi, but it's a convention that I like. It seems
to make the blocks fit in better with the other language constructs:

   for cd in collection
      cd.each_track do |title|
         # ...
      end
   end

to me looks cleaner than

   for cd in collection
      cd.each_track { |title|
         # ...
      }
   end

There's another style I;ve seen her which I'm still thinking
about. Some folks put the block parameters on their own line:

   a.doit {
     | name, address |
     # ...
   }

It certainly looks nice, but I can't quite convince myself there's a
reason to do it ;-)


Dave