#QUALITY by stefan
authorStefan Vogel <sv@exept.de>
Tue, 18 Feb 2020 23:40:17 +0100
changeset 25266 21fa0b4e0930
parent 25265 fd8ffbf7f292
child 25267 260aad034ec4
#QUALITY by stefan class: PositionableStream changed: #printOn:
PositionableStream.st
--- 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'!