Aleksi Niemel wrote: >> Back to the { } vs. do/end question: Although >> I've considered using { } for single-line blocks, >> I've decided that { } in Ruby is reserved for >> hashes. I think I'll use do/end for all blocks, >> to avoid that ambiguity. > >Even though I follow the principle we're been talking about, I have >considered your way too. But I have the opposing reason not to use do..end >for all blocks also: > > list.collect do |element| > element.tricky_calculation > end.this_is_not_nice > >I can read and accept {..}.with_chaining easily but do..end.with_chaining >doesn't look nice. I've tried to add some whitespace but I can't say it >helps in this case. True, but then as a rule I don't build complex chains. Keeping the code really simple also avoids the precedence problems with do/end that Amos mentioned. Kevin