[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-smalltalk] Inlined blocks

From: Nicolas Petton
Subject: [Help-smalltalk] Inlined blocks
Date: Sun, 24 Jan 2010 14:24:37 +0100


Today I discovered a strange bug in Iliad. I had troubles figuring where
the bug came from, and I realized it was because of an inlined closure

| c |

c := OrderedCollection new.
1 to: 10 do: [:each | c add: [each]].
c collect: [:each | each value]
-> OrderedCollection (11 11 11 11 11 11 11 11 11 11 11)

It works fine using (1 to: 10) do: [...]

In the future, I'll have to remember to avoid #to:do: with Iliad action
blocks :D



Attachment: signature.asc
Description: Ceci est une partie de message numériquement signée

reply via email to

[Prev in Thread] Current Thread [Next in Thread]