#QUALITY by exept
authorClaus Gittinger <cg@exept.de>
Mon, 26 Aug 2019 10:08:16 +0200
changeset 24629 5975b5d70a64
parent 24628 35b5c06ad5f0
child 24630 861b42a1a269
#QUALITY by exept class: WriteStream comment/format in: #next:put: changed: #nextPut:
WriteStream.st
--- a/WriteStream.st	Mon Aug 26 10:06:33 2019 +0200
+++ b/WriteStream.st	Mon Aug 26 10:08:16 2019 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
@@ -433,7 +435,7 @@
     collection from:position + 1 to:final put:anObject.
     position := position + count.
     (position > readLimit) ifTrue:[readLimit := position].
-    "/ ^ anObject -- return self
+    "/ ^ anObject -- no; return self
 
     "
      '' writeStream next:10 put:$*
@@ -483,7 +485,7 @@
                         __INST(readLimit) = __mkSmallInteger(pos);
                     }
                     __INST(position) = __mkSmallInteger(pos);
-                    RETURN ( anObject );
+                    RETURN ( self );
                 }
             } else if (cls == @global(ByteArray)) {
                 if (__isSmallInteger(anObject)
@@ -524,7 +526,6 @@
     ] ifFalse:[
         WriteError raiseErrorString:'write beyond writeLimit'
     ].
-    ^anObject
 !
 
 nextPutAll:aCollection