gitocello icon indicating copy to clipboard operation
gitocello copied to clipboard

Doubled method definition

Open frankshearar opened this issue 13 years ago • 2 comments

This comes from https://github.com/frankshearar/PersistentUnionFind/blob/master/Extensions/Dictionary.st -

!Dictionary methodsFor: '*PersistentUnionFind' stamp: 'fbs 1/2/2012 14:21'!
elementsOfClass: aParentObject
        ^ ((self associations
                select: [:assoc | (assoc value = aParentObject) or: [assoc key = aParentObject]]
                thenCollect: [:assoc | {assoc key. assoc value.}])
                        inject: #()
                        into: [:acc :each | acc , each]) asSet asArray! !
!

!Dictionary methodsFor: '*PersistentUnionFind' stamp: 'fbs 1/2/2012 13:57'!
elementsOfClass:: aParentObject
        ^ ((self associations
                select: [:assoc | (assoc value == aParentObject) or: [assoc key == aParentObject]]
                thenCollect: [:assoc | {assoc key. assoc value.}])
                        inject: #()
                        into: [:acc :each | acc , each]) asSet asArray! !

frankshearar avatar Jan 08 '12 15:01 frankshearar

Oh dear, never mind. Note the second method's name: #elementsOfClass:: as opposed to #elementsOfClass:. Sigh!

frankshearar avatar Jan 08 '12 15:01 frankshearar

Actually, what is interesting is that I have deleted #elementsOfClass:: from my image (and the package saved, of course), but the git repo wasn't told about that.

frankshearar avatar Jan 08 '12 15:01 frankshearar