Hi Jan, On 24 Jul 2012, at 13:34, kurs.jan <kurs@iam.unibe.ch> wrote:
I observe a strange behaviour (in Pharo-1.4-14557-one-click.app) while debugging the following code.
[ | a | self halt. a := (1 == 1).
a ifTrue: [ ^ 'A'] . Transcript crShow: 'foo'. ^ 'B'
] ensure: [ Transcript crShow: 'bar'. ]
If I comment out the halt statement and if I inspect the result of the attached code, the 'A' is returned and there is a 'bar' text in the transcript. If I inspect the result of the attached code (with halt enabled) and if I click step over in a debugger, I can see, that the statement ^ 'A' does NOT return, the program flow continues on the next line and the 'foo' is shown in the transcript. Now, I can click proceed and the 'B' is returned as a result. I tried the same process in Pharo-1.3-13328-OneClick.app and I got 'A' result in both cases.
Strange, I just tried on Pharo 2.0 and it worked as expected. Sven