From: Daniel Talsky Date: 2007-09-28T17:39:17+09:00 Subject: Re: how to do "do" blocks Well thanks fellas... that makes good sense. > You have to use only one form of block, either do...end or {}. The > convention seems to be to use do...end for multiline blocks, while {} > is used for one-liners. However, there's some lines of thought on the internet that have a different idea. What do you think of the idea that it's not "one line vs. multiline" but "returns a value vs. doesn't return a value". Here's the two posts I'm talking about: http://objo.com/2007/6/28/ruby-style-ruby-do-end-versus http://onestepback.org/index.cgi/Tech/Ruby/BraceVsDoEnd.rdoc In the first post, one of the commenters asks: > As for using {} only when returning a value, doesn’t every statement return a > value (in your example, the array with it’s elements capitalised and reversed)? And although he's wrong, the code in question: i.capitalize! is in-place changing the variable of course... but his point is still valid. Anyone want to weigh in on this? -- Posted via http://www.ruby-forum.com/.