http://code.google.com/p/pharo/issues/detail?id=7093
-- Sven Van Caekenberghe http://stfx.eu Smalltalk is the Red Pill On 02 Dec 2012, at 22:37, Sven Van Caekenberghe <[email protected]> wrote: > 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
