From: google@... (Tom Payne) Date: 2003-03-25T06:00:03+09:00 Subject: Re: Question about behavior of Array.new Gavin Sinclair wrote in message news:<125-2007456129.20030324132059@soyabean.com.au>... > A common idiom applied to this case yields: > > board = (0..9).map { Space.new } Presumably board = Array(10).map! { Space.new } is better? map doesn't know how many objects the Range's each method will return so it creates an empty array and repeatedly pushes objects onto it. Explicitly calling Array.new creates the right size array immediately -- much more efficient (not that it matters for one-off creations with so few elements). Tom