From cb6f59ff5b4ef9b87ce059bc12e12f6b24feeea1 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Mon, 13 Apr 2009 20:25:55 -0500 Subject: [PATCH] Fix unit test failure in math.parser --- core/math/parser/parser.factor | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/math/parser/parser.factor b/core/math/parser/parser.factor index 0a637c2eab..3fd62e69a0 100644 --- a/core/math/parser/parser.factor +++ b/core/math/parser/parser.factor @@ -50,7 +50,9 @@ SYMBOL: radix SYMBOL: negative? : string>natural ( seq radix -- n/f ) - [ [ digit> ] dip (digits>integer) ] each-digit ; inline + over empty? [ 2drop f ] [ + [ [ digit> ] dip (digits>integer) ] each-digit + ] if ; inline : sign ( -- str ) negative? get "-" "+" ? ;