#OTHER by exept
authorClaus Gittinger <cg@exept.de>
Mon, 26 Aug 2019 23:13:14 +0200
changeset 5165 4a704dcb76f9
parent 5164 0ac8d624e2ae
child 5166 84f50c9fd4e4
#OTHER by exept changed: #nextPut: returns its argument
ActorStream.st
--- a/ActorStream.st	Mon Aug 26 23:13:12 2019 +0200
+++ b/ActorStream.st	Mon Aug 26 23:13:14 2019 +0200
@@ -97,17 +97,17 @@
 !
 
 nextPut:aCharacter
-    "put something onto the stream by evaluating the nextPutBlock with
-     something as argument"
+    "put aCharacter onto the stream by evaluating the nextPutBlock with aCharacter as argument.
+     Answer anObject"
 
     nextPutBlock notNil ifTrue:[  
         nextPutBlock value:aCharacter.
-        ^ self.
+        ^ aCharacter.
     ].
     nextPutAllBlock notNil ifTrue:[    
         "/ fallBack to nextPutAll.
         self nextPutAll:(aCharacter asString).
-        ^ self
+        ^ aCharacter
     ].
     "/ if there is a nextPutLineBlock, then collect the line in a buffer and wait for the cr
     nextPutLineBlock notNil ifTrue:[
@@ -117,7 +117,7 @@
             self nextPutLine:(bufferedLine ? '').
             bufferedLine := ''.
         ].
-        ^ self
+        ^ aCharacter
     ].
     
     self error:'action for nextPut:/nextPutAll: are undefined'