[GemStone-Smalltalk] Variables and block closure

James Foster via GemStone-Smalltalk gemstone-smalltalk at lists.gemtalksystems.com
Tue Mar 17 11:52:13 PDT 2015


There are some bugs in the way blocks handle variables in GemStone/S 64-bit 3.2.x (and possibly earlier; you don’t mention your version) that will be fixed in 3.3 (but probably not before; this is described internally with bug #45059).

James

> On Mar 17, 2015, at 11:17 AM, Pierre CHANSON via GemStone-Smalltalk <gemstone-smalltalk at lists.gemtalksystems.com> wrote:
> 
> Hi everyone, 
> 
> I wonder why is that two expressions are not evaluated similarly by Gemstone, but they are by Pharo ?
> 
> The second one is the one I would like to be working like the first one is, in Gemstone.
> 
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> [ | traversal array| 
> traversal := [ :a | a do: [ :e | (e isArray) ifTrue: [ traversal value: e ] ifFalse: [ e asString ] ] ]. 
> array := Array with: (Array with: 1 with: 4) with: #ok with: (Array with: #henry).
> traversal value: array.
> ] on: Error do: [:evt | evt asString]
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> 
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> | traversal array| 
> [ traversal := [ :a | a do: [ :e | (e isArray) ifTrue: [ traversal value: e ] ifFalse: [ e asString ] ] ]. 
> array := Array with: (Array with: 1 with: 4) with: #ok with: (Array with: #henry).
> traversal value: array.
> ] on: Error do: [:evt | evt asString]
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> 
> Thank you,
> 
> Pierre
> 
> _______________________________________________
> GemStone-Smalltalk mailing list
> GemStone-Smalltalk at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/gemstone-smalltalk



More information about the GemStone-Smalltalk mailing list