On Sat, 2002-01-26 at 11:49, Yukihiro Matsumoto wrote:
> Hi,
> 
> In message "Re: Serious Array Bug in Ruby 1.6.6?"
>     on 02/01/26, William Djaja Tjokroaminata <billtj / y.glue.umd.edu> writes:
> 
> |Ruby has done a lot of checkings, like public/protected/private methods,
> |and attr_reader/attr_accessor methods.  For Array, why not just check the
> |type/class of obj when the array is created, just like what you do
> |for singleton?  If a program has to create and destroy arrays many many
> |times, probably it should have been written in C.
> 
> The point is what kind of check should be done.  Copying the fill
> value (the second optional argument to Array::new) implicitly is
> confusing for me.  One possible idea is
> 
>   Array::new(2) {Hash.new}
> 
> fills evaluated values from block.

I agree completely.  Array.new(2,Hash.new) behaves exactly as I would
expect it and the block like this would also behave exactly as I would
expect. It would be very clear what the difference is.  I think everyone
should be happy with this, it adds the wanted function and doesn't do
anything unexpected.  

/Erik

-- 
Erik BéČfors               | erik / bagfors.nu
Supporter of free software | GSM +46 733 279 273
fingerprint: 6666 A85B 95D3 D26B 296B 6C60 4F32 2C0B 693D 6E32