| Anonymous | Login | Signup for a new account | 06-19-2013 00:09 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 | ||||
| 0003574 | [Squeak] Collections | major | always | 05-09-06 07:08 | 04-18-10 22:05 | ||||
| Reporter | johnmci | View Status | public | ||||||
| Assigned To | andreas | ||||||||
| Priority | normal | Resolution | fixed | ||||||
| Status | closed | Product Version | 3.9 | ||||||
| Summary | 0003574: String>>findFirstInString:inSet:startingAt: does not work if character of interest is last character in String, also WideString | ||||||||
| Description |
IN the XMLWriter class try String findFirstInString: ' "' inSet: XMLTranslationMap startingAt: 1. This should return 2, because " is an entry in the XMLTranslationMap, however it return 0, because the code does not consider the last character in the string could be a character we are interested in. Perhaps code should look like String>>findFirstInString: aString inSet: inclusionMap startingAt: start "Trivial, non-primitive version" | i stringSize ascii more | inclusionMap size ~= 256 ifTrue: [^ 0]. stringSize _ aString size. more _ true. i _ start - 1. [more and: [i + 1 <= stringSize]] whileTrue: [ i _ i + 1. ascii _ (aString at: i) asciiValue. more _ ascii < 256 ifTrue: [(inclusionMap at: ascii + 1) = 0] ifFalse: [true]. ]. (more not and: [i = stringSize]) ifTrue: [^i]. i + 1 > stringSize ifTrue: [^ 0]. ^ i Also see WideString which is also I think is broken. |
||||||||
| Additional Information | |||||||||
| Attached Files |
|
||||||||
|
|
|||||||||
Relationships |
|||||||||||
|
|||||||||||
Notes |
|
|
(0004895 - 201 - 222 - 222 - 222 - 222 - 222) nicolas cellier 05-09-06 20:20 |
[FIX] provided in attachment. With this patch, we can now search for ordinary characters (asciiValue < 256) in WideString. This patch still does not handle searching the index of wide characters... |
|
(0004896 - 277 - 319 - 319 - 319 - 319 - 319) nicolas cellier 05-10-06 00:26 edited on: 05-10-06 00:58 |
[FIX] second fix and test in attachment Now, there is a WideCharacterSet transparentely handling Wide Characters (thanks to CharacterSet>>become:). We can search wide Characters in ByteString (use existing primitive with byte character subsets), and also in WideString. |
|
(0005946 - 13 - 13 - 13 - 13 - 13 - 13) MarcusDenker 07-15-06 18:03 |
test is added |
|
(0008793 - 133 - 133 - 133 - 133 - 133 - 133) black 01-02-07 22:24 |
This fix was posted 7 months ago. Unless there is reason to believe that it is defective, isn't it time to include it in the image? |
|
(0008828 - 179 - 233 - 233 - 233 - 233 - 233) Keith_Hodges 01-05-07 09:25 |
"fix begin" Installer mantis bug: 3574 fix: 'Collection-String-IndexOf-Patch.2.cs'. "fix test" Installer mantis bug: 3574 fix: 'Collection-String-IndexOf-Test.2.cs'. "fix end" |
|
(0010444 - 315 - 782 - 782 - 782 - 782 - 782) johnmci 03-15-07 00:14 |
findFirstInString: aString inCharacterSet: aCharacterSet startingAt: start "Trivial, non-primitive version" 1 to: aString size do: [:i | (aCharacterSet includes: (aString at: i)) ifTrue: [^ i]]. ^ 0 This changed method does not consider 'start', thus apparently does the wrong thing. |
|
(0010445 - 233 - 305 - 305 - 305 - 305 - 305) nicolas cellier 03-15-07 20:04 |
Oops... well found! Obviously a lack of testing ! "fix begin" Installer mantis bug: 3574 fix: 'Collection-String-IndexOf-Patch.3.cs'. "fix test" Installer mantis bug: 3574 fix: 'Collection-String-IndexOf-Test.3.cs'. "fix end" |
|
(0010481 - 98 - 104 - 104 - 104 - 104 - 104) edgardec 03-30-07 13:46 |
This now is 7071StringFindFirstInStringinSetstartingAt.cs and was in the 3.10 updates. Thanks all |
|
(0011206 - 224 - 242 - 242 - 242 - 242 - 242) nicolas cellier 09-25-07 19:05 |
Gasp! in 3.10 image, i browsed the senders of self, and WideCharacterSet is, the classical bug of omitting the period at the end of previous sentence! So I reopen the bug. Please upload WideCharacterSet-M3574-Patch.1.cs |
|
(0011438 - 373 - 409 - 621 - 621 - 621 - 621) nicolas cellier 11-15-07 20:29 |
Following http://lists.squeakfoundation.org/pipermail/squeak-dev/2007-November/122292.html, [^] hash is bugged. it sends an unimplemented message (due to some untested refactoring). moreover, since WideCharacterSet can equal ordinary CharacterSet, hash has to care of it, what it did not. WideCharacterSet-M3574-nice-hashPatch.1.cs is a patch correcting this behavior. |
|
(0011440 - 113 - 125 - 125 - 125 - 125 - 125) nicolas cellier 11-15-07 21:35 |
A convenient #newFrom: instance creation method was missing. WideCharacterSet-M3574-nice-newFrom.1.cs adds it. |
|
(0011446 - 88 - 88 - 88 - 88 - 88 - 88) nicolas cellier 11-19-07 22:33 |
WideCharacterSet-M3574-nice-Test.1.cs now adds a few tests to WideCharacterSet itself... |
|
(0011449 - 69 - 75 - 75 - 163 - 163 - 163) nicolas cellier 11-19-07 23:55 |
copy is bugged also (see 0006777). Please find test and patch again... |
|
(0011570 - 631 - 733 - 733 - 733 - 733 - 733) Keith_Hodges 12-17-07 17:46 edited on: 01-18-08 09:42 |
"fix begin" Installer mantis bug: 3574 fix:'Collection-String-IndexOf-Test.3.cs'. Installer mantis bug: 3574 fix:'WideCharacterSet-M3574-Patch.1.cs'. Installer mantis bug: 3574 fix:'WideCharacterSet-M3574-nice-hashPatch.1.cs'. Installer mantis bug: 3574 fix:'WideCharacterSet-M3574-nice-newFrom.1.cs'. Installer mantis bug: 3574 fix:'WideCharacterSet-copy-Patch-M3574-nice.1.cs'. "fix test" Installer mantis bug: 3574 fix:'Collection-String-IndexOf-Test.3.cs'. Installer mantis bug: 3574 fix:'WideCharacterSet-M3574-nice-Test.1.cs'. Installer mantis bug: 3574 fix:'WideCharacterSet-copy-Test-M3574-nice.1.cs'. "fix end" |
|
(0012328 - 14 - 14 - 14 - 14 - 14 - 14) ducasse 07-03-08 20:30 |
in pharo 10049 |
|
(0013307 - 190 - 208 - 536 - 536 - 536 - 536) nicolas cellier 09-14-09 23:27 |
main bug fixed in 3.10 colateral bugs introduced in 3.10 later fixed in http://source.squeak.org/trunk/Collections-nice.132.mcz [^] http://source.squeak.org/trunk/CollectionsTests-nice.95.mcz [^] |
| Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
160 total queries executed. 74 unique queries executed. |