Yes, I think so too, but maybe there was some reason for not doing it ?

On 02 Dec 2012, at 20:52, Sebastian Sastre <[email protected]> wrote:

> Hey guys,
> 
> would not make much much more sense if we return the result of evaluating the 
> block when we use dynamic variables?
> 
> Here is the patch I'm using these days:
> 
> DynamicVariable>>value: anObject during: aBlock
> 
>       | p oldValue result |
>       p := Processor activeProcess.
>       oldValue := (p psValueAt: index) ifNil: [self default].
>       [
>               p psValueAt: index put: anObject.
>               result := aBlock value.
>       ] ensure: [ 
>               p psValueAt: index put: oldValue 
>       ].
> 
>       ^ result 

--
Sven Van Caekenberghe
http://stfx.eu
Smalltalk is the Red Pill


Reply via email to