From e2f270be70306521bd6f120241a4b4e29f1c1cf0 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sat, 29 Dec 2007 12:35:51 -0500 Subject: [PATCH] Fix cleanup combinator in the case where always-cleanup throws an error --- core/continuations/continuations-tests.factor | 2 +- core/continuations/continuations.factor | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/continuations/continuations-tests.factor b/core/continuations/continuations-tests.factor index 667d81a30e..360f4750c9 100755 --- a/core/continuations/continuations-tests.factor +++ b/core/continuations/continuations-tests.factor @@ -104,5 +104,5 @@ SYMBOL: error-counter ] unit-test [ 3 ] [ always-counter get ] unit-test - [ 2 ] [ error-counter get ] unit-test + [ 1 ] [ error-counter get ] unit-test ] with-scope diff --git a/core/continuations/continuations.factor b/core/continuations/continuations.factor index 6bb5a50c4b..27ed277c6c 100755 --- a/core/continuations/continuations.factor +++ b/core/continuations/continuations.factor @@ -127,8 +127,8 @@ PRIVATE> >r (catch) r> ifcc ; inline : cleanup ( try cleanup-always cleanup-error -- ) - >r [ compose (catch) ] keep r> compose - [ dip rethrow ] curry ifcc ; inline + over >r compose [ dip rethrow ] curry + >r (catch) r> ifcc r> call ; inline : attempt-all ( seq quot -- obj ) [