Le 27 mai 2015 à 09:55, Marcus Denker a écrit : > >> On 27 May 2015, at 09:46, Christophe Demarey <[email protected]> >> 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
ok, thanks
smime.p7s
Description: S/MIME cryptographic signature
