Mantis - Squeak
Viewing Issue Advanced Details
6405 Collections block always 04-10-07 07:46 09-08-08 15:05
Damien Cassou AMD Sempron 3000+  
KenCausey GNU/Linux Kubuntu 5.10  
normal 2.6.12-10  
closed 3.10  
7081 fixed  
none    
none 3.10  
0006405: String>>keywords implementation is based on wrong behavior of PositionableStream>>isEmpty
String>>keywords tests for an empty stream when it should test for a stream at begining. This didn't cause any problem before because PositionableStream>>isEmpty was equivalent to this behavior. But this is not what #isEmpty is meant for (see http://bugs.squeak.org/view.php?id=2273). [^]

In the attached fix, I propose to change the implementation of String>>keywords from:

... kwd isEmpty...

to

... kwd position = 0 ...

Tests are present in the attached file too.
#up:to: keywords ==> returns #('up:' 'to:' '') with the correct implementation of PositionableStream>>isEmpty and the wrong implementation of String>>keywords

The result must be #('up:' 'to:').
duplicate of 0006409closed wiz in 7081 :7076fixPositionableStream-isEmpty.1.cs was wrong fix. Prettyprint broken by it. 
 String_keywords.1.cs [^] (1,239 bytes) 04-10-07 07:46

Notes
(0010512)
edgardec   
04-10-07 10:11   
This now is 7083fixStringkeywords.cs and was in updates for 3.10
Thanks Damien !
(0010513)
Damien Cassou   
04-10-07 10:13   
The bug can be closed.
(0010515)
Damien Cassou   
04-10-07 10:16   
The fix is included into update stream.
(0012587)
KenCausey   
09-08-08 15:05   
harvested in update 7083