From: Tom Metge Date: 2007-09-28T17:20:40+09:00 Subject: Re: how to do "do" blocks Take the "do" out of the statement when passing a block in {}: collection_of_objects = [] 10.times {collection_of_objects << MyObject.create} :) On 9/28/07 2:13 AM, "Daniel Talsky" wrote: > How come this works: > > collection_of_objects = [] > 10.times do > collection_of_objects << MyObject.create > end > > But this doesn't: > > collection_of_objects = [] > 10.times do { collection_of_objects << MyObject.create } > > I didn't understand there was ANY difference between the two syntaxes > really. Can someone explain to me the finer points?