Kernel.ConcatenatedStream fails when re-positioned

Project:GNU Smalltalk
Component:Base classes
Category:bug
Priority:normal
Assigned:Unassigned
Status:active
Description

The following code is working with a ReadStream but is failing with the ConcatenatedStream.


st> (Kernel.ConcatenatedStream with: ('3' readStream)) next; position: 0; next: 1

Object: ConcatenatedStream new "<0x558b6810>" error: premature end of stream: 1 element(s) missing
SystemExceptions.NotEnoughElements(Exception)>>signal (ExcHandling.st:254)
SystemExceptions.NotEnoughElements class>>signalOn: (SysExcept.st:359)
Kernel.ConcatenatedStream(Stream)>>next:into:startingAt: (Stream.st:105)
Kernel.ConcatenatedStream(Stream)>>next: (Stream.st:73)
UndefinedObject>>executeStatements (a String:1)

Updates

#1 submitted by Paolo Bonzini on Sun, 02/10/2013 - 20:46

ConcatenatedStream is not very positionable. It is mostly a hack optimized for performance. I'm not sure we want to fix this...

User login