[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] [PATCH 1/2] streams: Fix the ConcatenatedStream>>#c
From: |
Holger Hans Peter Freyther |
Subject: |
Re: [Help-smalltalk] [PATCH 1/2] streams: Fix the ConcatenatedStream>>#copyFrom:to: implementation |
Date: |
Tue, 9 Oct 2012 16:43:19 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Mon, Oct 08, 2012 at 06:07:13PM +0200, Paolo Bonzini wrote:
> You didn't include stream.st and stream.ok. :)
Yeah, had to stop in the middle of turbulances.. and then forgot that
I didn't finish it. The test and test result is attached and your patch
is failing with my testcase.
> - [(s := streams first) atEnd] whileTrue:
> - [streams size = 1 ifTrue: [^nil].
> - lastStart := startPos.
> + "This is somewhat performance-sensitive, so avoid testing for an
> + empty collection."
> + [(s := streams at: 1) atEnd] whileTrue:
> + [lastStart := startPos.
> startPos := startPos + curPos.
> curPos := 0.
> + streams size = 1 ifTrue: [last := streams first. ^nil].
I don't see why it is failing but maybe the test helps.
holger
stream.st
Description: Text document
stream.ok
Description: Text document