From: nobu.nokada@... Date: 2002-01-25T13:58:00+09:00 Subject: Re: Serious Array Bug in Ruby 1.6.6? Hi, At Fri, 25 Jan 2002 12:19:07 +0900, Dave Thomas wrote: > > > would invoke the block, passing in the array and '99'. Whenever the > > > block returned would be the value in the array. Isn't this the way > > > Hash.new works? > > > > I thought it too, but the problem is struct RArray has no more > > space to keep the block. Add to aux? > > Would it be bad to add a 'VALUE ifnone' to the end of RArray? Since objects are union, the addition makes ALL objects bigger. RArray already reachs the limit. aux.shared has no problem, since shared arrays should share default value also. But array with default value can't have capacity. It may be possible to add reference to extra struct in aux, or with generic ivar. But the former looks complex and the latter makes speed penalty for each array access. -- Nobu Nakada