Anonymous | Login | 02-22-2019 09:53 UTC |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0006665 | [Squeak] Collections | minor | always | 09-09-07 12:38 | 02-06-11 23:48 | ||||
Reporter | JTS | View Status | public | ||||||
Assigned To | leves | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | 3.10 | ||||||
Summary | 0006665: Bug in String>>#withoutQuoting | ||||||||
Description |
StringTest>>#testWithoutQuoting self assert: '''hi""' withoutQuoting == '''hi""'. self assert: '''hi' withoutQuoting == '''hi'. These test will fail. |
||||||||
Additional Information |
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 ]. |
||||||||
Attached Files | |||||||||
|
Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
42 total queries executed. 34 unique queries executed. |