(Igor speaking with Clement) Another, tangent.
I feel extremely wrong with given piece of code (however it works):
[ �^ 2 ] ensure: [ �^ 5 ]�
my point, that you cannot return from same context twice, and what happens here is really weird.
Or even more weird:
[ �^ 2 ] ifCurtailed: �[ �^ 5 ]�
or imagine more abstract case:
someBlock ifCurtailed: [ ^ 5 ]
The someBlock can belong to other context (like the caller context),
and if evaluating it leads to non-local return, it must continue execution from the sender context of its home context.
But alas, our ifCurtailed block thinks otherwise and intercepts that.. and does own non-local return to possibly alredy
unwinded portion of stack..
I feel there's something extremely wrong with that :)
We changed the #resume:through: method
to catch that:
unwindBlock ifCurtailed: [ self error: 'cannot resume execution due to curtailing' ]�
instead of: unwindBlock value
i am, however don't really know what is the least surprising behavior for such situation.