May 27, 2015
7:55 a.m.
On 27 May 2015, at 09:46, Christophe Demarey <christophe.demarey@inria.fr> wrote:
hi,
Does anyone knows if there is a particular reason to write this kind of code (snippet from RBRefactoringTest>>setUp
assoc := RBRefactoringManager classPool associationAt: #Instance ifAbsent: [RBRefactoringManager classPool associationAt: 'Instance']. manager := assoc value.
I guess someone wanted to reset the class var without adding a #reset method. There is #nuke, though: nuke Instance notNil ifTrue: [ Instance release ]. Instance := nil maybe the test does not want to call #release? The reflective API was improved in the meantime, you can just do RBRefactoringManagerclassVarNamed: âInstance' put: nil. Marcus