Oct. 12, 2015
12:26 p.m.
Hi, I just spotted this: Integer>>#putOn: aStream (aStream isBinary ifTrue: [ self asByteArray ] ifFalse: [ self asString]) putOn: aStream It does not look so bad at the begining, but⦠if I do: ByteArray streamContents: [ :s | 42 putOn: s ] I got an infinite loop. I know, it does not look as a very typical case, but⦠if Iâm writing to a Socket and I want to use mySocket << 255 âIACâ, thatâs exactly what will happen :( If I redefine it as: Integer>>#putOn: aStream aStream isBinary ifFalse: [ self asString putOn: aStream. ^ self ]. self asByteArray do: [ :each | aStream nextPut: each ] then is ok⦠Would that be a good change? Esteban