This change looks right to me.
Levente
On Sat, 31 Jan 2015, Marcel Taeumel wrote:
> Actually, *this* seems to work now:
>
> value: anObject during: aBlock
>
> | p oldValue defaultUsed |
> p := Processor activeProcess.
> defaultUsed := false.
> oldValue := p environmentAt: self ifAbsent: [defaultUsed := true. nil].
> ^[
> p environmentAt: self put: anObject.
> aBlock value ]
> ensure: [ defaultUsed
> ifTrue: [p environmentRemoveKey: self]
> ifFalse: [p environmentAt: self put: oldValue] ].
>
>
>
> --
> View this message in context:
http://forum.world.st/Oblivous-caching-DynamicVariable-default-tp4802924p4802936.html> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>
>