Cons.st
changeset 2448 f21170d2e545
parent 2437 58c3242dc76d
child 2469 67e364844a2b
--- a/Cons.st	Thu May 13 12:53:54 2010 +0200
+++ b/Cons.st	Tue May 18 10:25:55 2010 +0200
@@ -406,6 +406,12 @@
 !
 
 printOn:aStream
+    thisContext isRecursive ifTrue:[ 
+        'Cons [error]: printOn: of self referencing collection.' errorPrintCR.
+        aStream nextPutAll:'#("recursive")'.
+        ^ self.
+    ].
+
     (car isLazyValue not and:[ car isCons ]) ifTrue:[
         aStream nextPutAll:'('.
         car printOn:aStream.
@@ -423,6 +429,8 @@
     ] ifFalse:[
         cdr printOn:aStream.
     ].
+
+    "Modified: / 18-05-2010 / 10:25:49 / cg"
 ! !
 
 !Cons methodsFor:'queries'!
@@ -460,9 +468,9 @@
 !Cons class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic2/Cons.st,v 1.10 2010-03-25 23:18:37 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/Cons.st,v 1.11 2010-05-18 08:25:55 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic2/Cons.st,v 1.10 2010-03-25 23:18:37 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/Cons.st,v 1.11 2010-05-18 08:25:55 cg Exp $'
 ! !