WriteStream.st
changeset 24629 5975b5d70a64
parent 24032 a89bc30b9339
child 24632 6a4473a8f19d
--- 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