Hi On 01 Nov 2011, at 1:41 PM, mail list wrote:
self deny: (set includes: 1@1). -->fails
set = (2@2,1@1) so it seems to think that x and 1@1 are the same. Which to me seems correct but I may be misunderstanding the testcase.
KKIdentitySet should not think x and 1@1 are the same as they are 2 different instances. I would think that the implementation of Set has changed (@see scanFor: method, specifically the SetElement wrapper around nil). My guess would be that Set storage has changed slightly. Maybe try changing KKIdentitySet to be: KKIdentitySet>>scanFor: anObject "Scan the key array for the first slot containing either a nil (indicating an empty slot) or an element that matches anObject. Answer the index of that slot or raise an error if no slot is found. This method will be overridden in various subclasses that have different interpretations for matching elements." | index start | index := start := anObject hash \\ array size + 1. [ | element | ((element := array at: index) == nil or: [ element enclosedSetElement == anObject ]) ifTrue: [ ^index ]. (index := index \\ array size + 1) = start ] whileFalse. self errorNoFreeSpace Cheers Carlo