given the following methods:
printOn: aStream
""head: body with dot.
head: ·. ""
| middleDot |
middleDot := Character value: 183.
rule head printOn: aStream.
aStream nextPutAll: ': '.
rule body withIndexDo: [ :each :index |
index = 1 ifFalse: [ aStream nextPutAll: ', ' ].
index = self dotIndex ifTrue: [ aStream nextPut: middleDot ].
each printOn: aStream ].
self isFinal ifTrue: [ aStream nextPut: middleDot ].
aStream nextPut: $.
printOn: aStream
""head: body.
head: . ""
head printOn: aStream.
aStream nextPutAll: ': '.
body
do: [ :each | each printOn: aStream ]
separatedBy: [ aStream nextPutAll: ', ' ].
aStream nextPut: $.
the character $. is identified as unnecessary and can be transformed but the resulting code doesn't compile.
Expected result: those methods don't have unnecessary characters.
given the following methods:
the character $. is identified as unnecessary and can be transformed but the resulting code doesn't compile.
Expected result: those methods don't have unnecessary characters.