[Pharo-users] Debugging block with ensure block
kurs at iam.unibe.ch
Tue Jul 24 07:34:36 EDT 2012
I observe a strange behaviour (in Pharo-1.4-14557-one-click.app) while
debugging the following code.
| a |
a := (1 == 1).
a ifTrue: [ ^ 'A'] .
Transcript crShow: 'foo'.
] 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
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
I tried the same process in Pharo-1.3-13328-OneClick.app and I got 'A'
result in both cases.
I tried on this system:
System Version: Mac OS X 10.7.3 (11D2001)
Kernel Version: Darwin 11.3.0
View this message in context: http://forum.world.st/Debugging-block-with-ensure-block-tp4641279.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
More information about the Pharo-users