until expressions now properly iterate until their condition is truthy.
As mentioned in #154, the specs for while and until weren't actually testing any of their behavior. The new specs should not be considered complete, but at least cover the basic use cases, including break from within a loop.
Loop expressions also now properly catch BreakExceptions to stop iteration and optionally return a value. Because BreakException pushes a value onto the stack, no additional work is needed to handle this case.
until
expressions now properly iterate until their condition is truthy.As mentioned in #154, the specs for
while
anduntil
weren't actually testing any of their behavior. The new specs should not be considered complete, but at least cover the basic use cases, includingbreak
from within a loop.Loop expressions also now properly catch
BreakException
s to stop iteration and optionally return a value. BecauseBreakException
pushes a value onto the stack, no additional work is needed to handle this case.