[Pharo-project] isHealthy

Igor Stasenko siguctua at gmail.com
Thu Apr 14 10:43:42 CEST 2011

On 14 April 2011 10:18, Henrik Sperre Johansen
<henrik.s.johansen at veloxit.no> wrote:
> On 14.04.2011 10:09, Igor Stasenko wrote:
>> On 13 April 2011 16:49, Stéphane Ducasse<stephane.ducasse at inria.fr>
>>  wrote:
>>> Hi igor
>>> this is strange I have a dictionary whose array contains nil  and still
>>> isHealthy returns true.
>>> can an array of a dictionary contains nil?
>> no, it can't .
>> And how you end up with dictionary which having array = nil? During
>> initialization, it allocates and initializes array,
>> so, normally, there is no way how it could be nil.
> Ehm, the array can _contain_ nil(the empty slot marker) (and it will in all
> cases, if it's working correctly), it cannot _be_ nil though.
> isHealthy has nothing to do with this though, it checks if all elements
> (non-nil entries in the array) are at positions which are valid.

Err.. maybe i misunderstood?

i meant

dict array == nil

should not happen, but

(dict array at: someindex ) == nil

is quite normal.

> Cheers,
> Henry

Best regards,
Igor Stasenko AKA sig.

More information about the Pharo-project mailing list