> On 26 Dec 2020, at 20:41, Sean P. DeNigris <s...@clipperadams.com> wrote:
> 
> Sven Van Caekenberghe-2 wrote
>> Maybe his question is (also) why the automatic refactoring did it wrong,
>> the rules warned about the wrong use of #printString, suggested a fix, but
>> the solution is still using #printString, hence the same problem.
> 
> I might be reading it wrong, but I thought everything worked as advertised,
> and the limitation was that there was no option to automatically fix the
> other warning about the printString. The "Use cascaded nextPutAll:’s instead
> of #, in #nextPutAll:" transformation did change:
> 
> aStream nextPutAll: ' with value: ', count printString.
> 
> to:
> 
> aStream
>  nextPutAll: ' with value: ';
>  nextPutAll: count printString
> 
> 


Yes but with such approach you still create an extra intermediary 
stream. 

The solution should be 


aStream
   nextPutAll: ' with value: ‘.
   count printOn: aStream

Now this is a bit more tricky to do.




> 
> -----
> Cheers,
> Sean
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

--------------------------------------------
Stéphane Ducasse
http://stephane.ducasse.free.fr / http://www.pharo.org 
03 59 35 87 52
Assistant: Aurore Dalle 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France

Reply via email to