From: Josh Cheek Date: 2010-01-10T10:47:48+09:00 Subject: Re: Ruby editing style rules and recommendation? --000e0cd1eb0a9277a6047cc59b35 Content-Type: text/plain; charset=ISO-8859-1 On Sat, Jan 9, 2010 at 2:01 PM, Nathan Oyama wrote: > Which one is recommended in terms of the editing style? > I usually use braces for single line, and do/end for multi-line. I've also started alternating them to make it clearer where blocks start and end. def whatever each { |obj| if obj < MID call_method else self.var = yield obj call_other_method end } end def whatever each do |obj| if obj < MID call_method else self.var = yield obj call_other_method end end end I think the top one is much easier to read, so I sometimes alternate now. --000e0cd1eb0a9277a6047cc59b35--