From be26a4f63d69e2ae18747bde5c510fcd93099b91 Mon Sep 17 00:00:00 2001 From: Daniel Ehrenberg Date: Thu, 2 Jul 2009 20:24:41 -0500 Subject: [PATCH] Fixing long-standing bug in wrap --- basis/wrap/wrap-tests.factor | 5 +++++ basis/wrap/wrap.factor | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 basis/wrap/wrap-tests.factor diff --git a/basis/wrap/wrap-tests.factor b/basis/wrap/wrap-tests.factor new file mode 100644 index 0000000000..e597b95088 --- /dev/null +++ b/basis/wrap/wrap-tests.factor @@ -0,0 +1,5 @@ +! Copyright (C) 2009 Daniel Ehrenberg +! See http://factorcode.org/license.txt for BSD license. +USING: wrap tools.test ; + +[ { } ] [ { } 10 10 wrap ] unit-test diff --git a/basis/wrap/wrap.factor b/basis/wrap/wrap.factor index c648f6bd61..b28b0bcbff 100644 --- a/basis/wrap/wrap.factor +++ b/basis/wrap/wrap.factor @@ -77,8 +77,10 @@ SYMBOL: line-ideal [ line-ideal set line-max set - initialize - [ wrap-step ] reduce - min-cost - post-process + [ { } ] [ + initialize + [ wrap-step ] reduce + min-cost + post-process + ] if-empty ] with-scope ;