[squeak-dev] Serious bug in 3.10

Keith Hodges keith_hodges at yahoo.co.uk
Thu Jul 31 22:46:33 UTC 2008


askoh wrote:
> | block |
> block := [:i | Transcript cr; show: i].
> 1 to: 10 do: [:i | block value: i+1]
>
> The above should print ten times. But it only prints the five even numbers.
> That is a bug isn't it?
>
> Aik-Siong Koh
>   
More of a "known limitation" than a bug... due to the fact that squeak 
does not have proper closures.

try

| block |
block := [:j | Transcript cr; show: j].
1 to: 10 do: [:i | block value: i+1]

Keith




More information about the Squeak-dev mailing list