From 712b21b59e14c78e387b3e6cd17fb0471ed46960 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 31 Mar 2009 01:37:05 -0500 Subject: [PATCH] Fix printing of nested arrays --- extra/smalltalk/printer/printer-tests.factor | 4 ++++ extra/smalltalk/printer/printer.factor | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 extra/smalltalk/printer/printer-tests.factor diff --git a/extra/smalltalk/printer/printer-tests.factor b/extra/smalltalk/printer/printer-tests.factor new file mode 100644 index 0000000000..e9f4bd9451 --- /dev/null +++ b/extra/smalltalk/printer/printer-tests.factor @@ -0,0 +1,4 @@ +IN: smalltalk.printer.tests +USING: smalltalk.printer tools.test ; + +[ "#((1 2) 'hi')" ] [ { { 1 2 } "hi" } smalltalk>string ] unit-test \ No newline at end of file diff --git a/extra/smalltalk/printer/printer.factor b/extra/smalltalk/printer/printer.factor index 70055e8e77..9b6aa11114 100644 --- a/extra/smalltalk/printer/printer.factor +++ b/extra/smalltalk/printer/printer.factor @@ -20,7 +20,7 @@ GENERIC: array-element>string ( object -- string ) M: object array-element>string smalltalk>string ; M: array array-element>string - [ smalltalk>string ] map " " join "(" ")" surround ; + [ array-element>string ] map " " join "(" ")" surround ; M: array smalltalk>string array-element>string "#" prepend ;