Mantis - Squeak
Viewing Issue Advanced Details
6665 Collections minor always 09-09-07 12:38 02-06-11 23:48
JTS  
leves  
normal  
closed 3.10  
fixed  
none    
none trunk  
0006665: Bug in String>>#withoutQuoting
StringTest>>#testWithoutQuoting

    self assert: '''hi""' withoutQuoting == '''hi""'.
    self assert: '''hi' withoutQuoting == '''hi'.

These test will fail.
Here is the fix that passes the test:

withoutQuoting
    "remove the initial and final quote marks, if present"

    | quoteMark |
    self size < 2 ifTrue: [ ^self ].
    quoteMark := self first.
    (quoteMark = self last and: [quoteMark = $' or: [quoteMark = $"]] )
        ifTrue: [ ^self copyFrom: 2 to: self size - 1 ]
        ifFalse: [ ^self ].

Notes
(0011102)
wiz   
09-10-07 00:22   
Cool,

How about submitting the fix and the tests as code uploads?

That would ease the task of checking and speed harvesting.

Yours in curiosity and service, --Jerome Peace
(0013936)
leves   
11-16-10 05:48   
Fixed in Collections-ul.407.