#ensure: broken?

Josh Gargus schwa at fastmail.us
Fri Sep 23 16:29:04 UTC 2005


Hi,

When I run the following code...
[4 / 0] ensure: [self halt]
... I get a ZeroDivide debugger, as expected.  However, the halt does  
not get executed when I press the "Abandon" button (although pressing  
"Proceed" does cause it to be executed).

Interestingly,
[[4 / 0] ensure: [self halt]] on: ZeroDivide do: [:e | ]
does result in the halt being executed.

This behavior seems to defy common sense, not to mention my  
understanding of Section 5.4.3.1 of the ANSI standard.  When I say  
"make sure this happens", I'm not joking around :-)  Can anyone  
explain this to me?  Or, better yet, fix it?  :-)

This has been observed on Macintosh 3.7.5 and 3.8.6 VMs, as well as  
Windows 3.7.1.

Thanks,
Josh



More information about the Squeak-dev mailing list