PositionableStream.st
changeset 25266 21fa0b4e0930
parent 24998 8a9c4313c1b7
--- a/PositionableStream.st	Tue Feb 18 17:05:48 2020 +0100
+++ b/PositionableStream.st	Tue Feb 18 23:40:17 2020 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
@@ -621,21 +623,25 @@
 !PositionableStream methodsFor:'printing & storing'!
 
 printOn:aStream
+    |sz|
+
     aStream 
         nextPutAll:self className; 
         nextPutAll:'(on:'.
-    (collection isString and:[collection size < 80]) ifTrue:[
-        aStream nextPutAll:collection storeString
+    (collection isString and:[(sz := self collectionSize) < 80]) ifTrue:[
+        aStream nextPutAll:(collection copyTo:sz) storeString
     ] ifFalse:[
         aStream nextPutAll:collection classNameWithArticle
     ].
-    aStream nextPutAll:'|'; print:position.
+    aStream nextPut:$|; print:position.
     aStream nextPut:$)
 
     "
       '' readStream printString
       '' writeStream printString
     "
+
+    "Modified: / 18-02-2020 / 23:37:40 / Stefan Vogel"
 ! !
 
 !PositionableStream methodsFor:'private'!