From 19919bb1307c11ee63fbd9b461aa1b7297ca2c31 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 15 Jul 2008 20:57:56 -0500 Subject: [PATCH] Fix soundex --- extra/soundex/soundex-tests.factor | 1 + extra/soundex/soundex.factor | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/extra/soundex/soundex-tests.factor b/extra/soundex/soundex-tests.factor index df6338c4ec..f4bd18e34b 100644 --- a/extra/soundex/soundex-tests.factor +++ b/extra/soundex/soundex-tests.factor @@ -2,3 +2,4 @@ IN: soundex.tests USING: soundex tools.test ; [ "S162" ] [ "supercalifrag" soundex ] unit-test +[ "M000" ] [ "M" soundex ] unit-test diff --git a/extra/soundex/soundex.factor b/extra/soundex/soundex.factor index c82825d814..23d5ee4d4c 100644 --- a/extra/soundex/soundex.factor +++ b/extra/soundex/soundex.factor @@ -25,8 +25,8 @@ TR: soundex-tr [ first>upper ] [ soundex-tr - trim-first - remove-duplicates + [ "" ] [ trim-first ] if-empty + [ "" ] [ remove-duplicates ] if-empty remove-zeroes ] bi pad-4