2007-06-10 Stephen Compall * kernel/WeakObjects.st: Add #includes: to WeakSet, as the inherited method doesn't work with this class. Add #identityIncludes: to WeakIdentitySet. --- orig/kernel/WeakObjects.st +++ mod/kernel/WeakObjects.st @@ -264,6 +264,11 @@ ^anObject ! +includes: anObject + "Answer whether I contain anObject." + ^super includes: (HomedAssociation key: anObject value: nil environment: self) +! + remove: anObject ifAbsent: aBlock "Remove oldObject to the set. If it is found, answer oldObject. Otherwise, evaluate aBlock and return its value." @@ -470,6 +475,14 @@ ! ! +!WeakIdentitySet methodsFor: 'accessing'! + +identityIncludes: anObject + "Answer whether I include anObject exactly. As I am an + identity-set, this is the same as #includes:." + ^self includes: anObject +! ! + !WeakIdentitySet methodsFor: 'private methods'! hashFor: anObject