From: glenn_m_smith@... (Glenn) Date: 2004-05-02T16:13:59+09:00 Subject: Re: Ruby Newbie (ooh, that rhymes!) - When do I use do/end, when {}? Gennady Bystritsky wrote in message news:... > > There's also another usage some people, including myself, agree on: > do...end for blocks that actually DO stuff, like in Array#each, > File.open, Integer#times (Mark, sorry for contradiction ;-)), etc.; {} > for blocks that define conditions, like in map, select/reject, sort, > etc. > And this would include curlies for hash definitions then? I like the idea of standardising on do/end for multi-line blocks and curlies for single lines. That makes sense. I like the readability of using do/end - seems to make for nicer code. Thanks all, you've helped a lot. Ruby certainly does rock!