From: Sam Duncan Date: 2010-11-30T13:36:55+09:00 Subject: Re: RFC Future Ruby hash literal syntax Oops, just realised I didn't need the x ruby-1.9.2-p0 > ([1]*3).map! {Object.new} => [#, #, #] Sam On 30/11/10 17:20, Sam Duncan wrote: > ruby-1.9.2-p0 > ([1]*3).map! {|x| Object.new} > => [#, #, > #] > > ?? > > > On 30/11/10 16:54, Yossef Mendelssohn wrote: >> On Nov 29, 9:48 pm, Ryan Davis wrote: >>> On Nov 29, 2010, at 19:40 , Yossef Mendelssohn wrote: >>> >>>> On Nov 29, 5:31 pm, Ryan Davis wrote: >>>>> I think all variants or Array.new are essentially useless and >>>>> stick to [] for everything. >>>> What's your [] equivalent of `Array.new(3) { Thing.new }`? >>> BenArray.new(3, Thing.new) works great! >> I've yet to use BenArray, but assuming it follows BenString >> conventions: >> >> >> Array.new(3, Object.new) >> => [#, #, #] >> >> Array.new(3) { Object.new } >> => [#, #, #] >> >> My question still stands. >> >> -- >> -yossef >> >