[Glass] Stream >> cr is wrong?

Mariano Martinez Peck marianopeck at gmail.com
Mon Mar 17 13:57:01 PDT 2014


Hi guys,

I think I found a bug. Just watching the code, #cr answering LF makes me
wonder...

Stream >> *cr*

"Adds a newline to the output stream."

self nextPut: Character *lf*.

This piece of code

String new writeStream
nextPutAll: 'mariano';
cr;lf;
nextPutAll: 'bug?';
contents

answers

 'mariano

bug?'


While this one:

String new writeStream
nextPutAll: 'mariano';
nextPut: Character cr;
nextPut: Character lf;
nextPutAll: 'bug?';
contents

Answers:

 'mariano
bug?'

So....is this a bug? or is it on purpose? I ask because I have code sending
#crlf and in Pharo it is correct but in GemStone I get empty rows below
each row ;)

Thanks,



-- 
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20140317/a01c6ad2/attachment.html>


More information about the Glass mailing list