Levente Uzonyi uploaded a new version of Regex-Core to project The Trunk:
http://source.squeak.org/trunk/Regex-Core-ul.47.mcz==================== Summary ====================
Name: Regex-Core-ul.47
Author: ul
Time: 26 March 2016, 8:40:59.776673 pm
UUID: 37a57fa6-b710-420a-a5fa-c4ce991ec118
Ancestors: Regex-Core-ul.46
- fix a slip in RxMatchOptimizer >> #prefixTester
=============== Diff against Regex-Core-ul.46 ===============
Item was changed:
----- Method: RxMatchOptimizer>>prefixTester (in category 'private') -----
prefixTester
| p |
prefixes ifNil: [ ^nil ].
prefixes size = 1 ifTrue: [
| prefixChar |
prefixChar := prefixes anyOne.
ignoreCase ifTrue: [
| lowercasePrefixChar |
lowercasePrefixChar := prefixChar asLowercase.
prefixChar := prefixChar asUppercase.
prefixChar == lowercasePrefixChar ifFalse: [
^[ :char :matcher | char == prefixChar or: [ char == lowercasePrefixChar ] ] ] ].
^[ :char :matcher | char == prefixChar ] ].
ignoreCase ifTrue: [
prefixes copy do: [ :each |
| character |
+ (character := each asUppercase) == each
+ ifFalse: [ prefixes add: character ]
+ ifTrue: [
+ (character := each asLowercase) == each ifFalse: [
+ prefixes add: character ] ] ] ].
- (character := each asUppercase) == each ifFalse: [
- prefixes add: character ].
- (character := each asUppercase) == each ifFalse: [
- prefixes add: character ] ] ].
prefixes size < 10 ifTrue: [ "10 is an empirical value"
p := prefixes asArray.
^[ :char :matcher | p instVarsInclude: char ] ].
^[ :char :matcher | prefixes includes: char ]!