#OTHER
class: AbstractOperatingSystem
changed: #shuffleAllFrom:to:lineWise:lockWith:
Handle closed streams
--- a/AbstractOperatingSystem.st Wed Dec 09 13:47:03 2015 +0100
+++ b/AbstractOperatingSystem.st Wed Dec 09 16:25:44 2015 +0100
@@ -907,15 +907,15 @@
shuffleAllFrom:anInStream to:anOutStream lineWise:lineWise lockWith:aLock
lineWise ifFalse:[
- ^ anInStream copyToEndInto:anOutStream.
+ ^ anInStream copyToEndInto:anOutStream.
].
- [anInStream atEnd] whileFalse:[
- aLock critical:[
- self
- shuffleFrom:anInStream
- to:anOutStream
- lineWise:lineWise
- ]
+ [anInStream isOpen and:[anInStream atEnd not]] whileTrue:[
+ aLock critical:[
+ self
+ shuffleFrom:anInStream
+ to:anOutStream
+ lineWise:lineWise
+ ]
]
!