--- a/IdentityDictionary.st Thu Jun 30 21:11:02 2016 +0100
+++ b/IdentityDictionary.st Thu Jun 30 21:12:35 2016 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1992 by Claus Gittinger
All Rights Reserved
@@ -98,7 +100,7 @@
[
probe := keyArray basicAt:index.
- probe == key ifTrue:[^ index]. "<<<< == is different from inherited"
+ probe == key ifTrue:[^ index]. "<--- == is different from inherited"
probe isNil ifTrue:[^ aBlock value].
index == length ifTrue:[
@@ -130,17 +132,15 @@
[
probe := keyArray basicAt:index.
- key == probe ifTrue:[^ index]. "<<<< == is different from inherited"
+ key == probe ifTrue:[^ index]. "<--- == is different from inherited"
probe isNil ifTrue:[
delIndex == 0 ifTrue:[^ index].
keyArray basicAt:delIndex put:nil.
^ delIndex
].
- probe == DeletedEntry ifTrue:[
- delIndex == 0 ifTrue:[
- delIndex := index
- ]
+ (delIndex == 0 and:[probe == DeletedEntry]) ifTrue:[
+ delIndex := index
].
index == length ifTrue:[
@@ -153,7 +153,9 @@
keyArray basicAt:delIndex put:nil.
^ delIndex
].
- ^ self grow findKeyOrNil:key
+ self grow.
+ length := keyArray basicSize.
+ startIndex := index := self initialIndexForKey:key.
].
] loop.