[Pharo-dev] adding temporary adds them outside the temp declaration?

Stéphane Ducasse stephane.ducasse at inria.fr
Sun Aug 11 11:36:19 EDT 2013


Hi guys

Is it a know bug?

| selector superClasses |
	selector := aMethodDefinition selector.
	superClasses := aMethodDefinition realClass allSuperclasses.
	result := OrderedCollection new. 
	(superClasses select: [ :eachClass | eachClass hasProtocolFor: selector])
		do: [ :eachClass | (eachClass includesSelector: selector)
								ifTrue: [ result add: (self whichCategoryIncludesSelector: selector)]].
	^ result asBag

adds result

result | selector superClasses |
	selector := aMethodDefinition selector.
	superClasses := aMethodDefinition realClass allSuperclasses.
	result := OrderedCollection new. 
	(superClasses select: [ :eachClass | eachClass hasProtocolFor: selector])
		do: [ :eachClass | (eachClass includesSelector: selector)
								ifTrue: [ result add: (self whichCategoryIncludesSelector: selector)]].
	^ result asBag

stef



More information about the Pharo-dev mailing list