class: ReadWriteStream
authorClaus Gittinger <cg@exept.de>
Mon, 03 Jun 2013 20:39:21 +0200
changeset 15355 8d39f7b4eb52
parent 15354 21ebb380b376
child 15356 854a02a2bebc
class: ReadWriteStream changed: #next #peek (foo+1) > x is the same as foo >= x
ReadWriteStream.st
--- a/ReadWriteStream.st	Mon Jun 03 20:39:07 2013 +0200
+++ b/ReadWriteStream.st	Mon Jun 03 20:39:21 2013 +0200
@@ -71,7 +71,7 @@
 
     |element|
 
-    ((position+1) > readLimit) ifTrue:[^ self pastEndRead].
+    (position >= readLimit) ifTrue:[^ self pastEndRead].
     element := collection at:(position+1).
     position := position + 1.
     ^ element
@@ -90,7 +90,7 @@
     "return the element to be read next without advancing read position.
      If there are no more elements, nil is returned."
 
-    ((position+1) > readLimit) ifTrue:[^ self pastEndRead].
+    (position >= readLimit) ifTrue:[^ self pastEndRead].
     ^ collection at:(position+1)
 
     "Modified: 5.2.1996 / 21:57:47 / stefan"
@@ -164,6 +164,10 @@
 !ReadWriteStream class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ReadWriteStream.st,v 1.31 2013-06-03 18:32:02 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ReadWriteStream.st,v 1.32 2013-06-03 18:39:21 cg Exp $'
+!
+
+version_CVS
+    ^ '$Header: /cvs/stx/stx/libbasic/ReadWriteStream.st,v 1.32 2013-06-03 18:39:21 cg Exp $'
 ! !