]> gitweb.factorcode.org Git - factor.git/commitdiff
Fix printing of nested arrays
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Tue, 31 Mar 2009 06:37:05 +0000 (01:37 -0500)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Tue, 31 Mar 2009 06:37:05 +0000 (01:37 -0500)
extra/smalltalk/printer/printer-tests.factor [new file with mode: 0644]
extra/smalltalk/printer/printer.factor

diff --git a/extra/smalltalk/printer/printer-tests.factor b/extra/smalltalk/printer/printer-tests.factor
new file mode 100644 (file)
index 0000000..e9f4bd9
--- /dev/null
@@ -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
index 70055e8e7790455f83ac0090f428886b764dff60..9b6aa111142191172a9daef4c5c828a5491951ad 100644 (file)
@@ -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 ;