From fbe868289c49b4b30a8680ea13db7a9f6b5d1687 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Sun, 12 Sep 2010 00:22:02 -0500 Subject: [PATCH] Fix with-streams: if the first dispose throws an error, the second dispose never gets called --- core/io/io.factor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/io/io.factor b/core/io/io.factor index e074135e8c..085f8f3e70 100644 --- a/core/io/io.factor +++ b/core/io/io.factor @@ -80,7 +80,7 @@ SYMBOL: error-stream : with-streams ( input output quot -- ) [ [ with-streams* ] 3curry ] - [ [ drop dispose dispose ] 3curry ] 3bi + [ [ [ drop [ &dispose drop ] bi@ ] 3curry ] with-destructors ] 3bi [ ] cleanup ; inline : print ( str -- ) output-stream get stream-print ;