From: Lars Christensen Date: 2010-01-13T21:30:26+09:00 Subject: Re: Ruby editing style rules and recommendation? On Sat, Jan 9, 2010 at 9:01 PM, Nathan Oyama wrote: > 0.step(0.5,0.1) { |i| p i } > > while Aaron wrote: > > (0..0.5).step(0.1) do |f| >  p f > end > > Which one is recommended in terms of the editing style? Whichever makes the code more readable in each situation. I tend to use braces/{ } in functional-style code and do/end in imperative-style code. For example, I usually use braces with Enumerable#map/select/delete_if/find/sort, and do/end with Enumerable#each, File#open and Thread#new.