On 05.06.2010 15:30, Niko Schwarz wrote:
Hi list,
http://code.google.com/p/pharo/issues/detail?id=2508&can=4&colspec=ID%20Type%20Status%20Summary%20Milestone%20Difficulty
The following mini unit test fails:
readWriteStreamShouldHonorStartIndex
self assert: ( (ReadWriteStream on: 'hallo' from: 3 to: 4) contents = 'll')
Instead, contents returns 'hall'
Pharo image:core
Pharo core version: PharoCore1.1ALPHA, Latest update: #11383
Virtual machine used: pharo-vm-osx
Steps to reproduce:
1. Subclass TestCase and add the above method
2. run the test
Cheers,
Niko
Well, this is more an issue with contents, which returns the entire
collection up to readLimit. (or position if it's a WriteStream)
From the ANSI standard:
"content returns a collection that contains the receiver's _past_ and
future sequence values, in order".
The method which behaves as you expect, is called upToEnd.
Cheers, Henry
_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project