On Mon, Nov 29, 2010 at 9:40 PM, Yossef Mendelssohn <ymendel / pobox.com>wrote:

> On Nov 29, 5:31 pm, Ryan Davis <ryand-r... / zenspider.com> 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 }`?
>
> --
> -yossef
>
>
Don't even need to go that far, even the String version has this issue.

a = ['A'] * 5
a.first << 'B'
a # => ["AB", "AB", "AB", "AB", "AB"]