[squeak-dev] The Trunk: Regex-Core-ul.39.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Aug 17 20:21:02 UTC 2015


Levente Uzonyi uploaded a new version of Regex-Core to project The Trunk:
http://source.squeak.org/trunk/Regex-Core-ul.39.mcz

==================== Summary ====================

Name: Regex-Core-ul.39
Author: ul
Time: 17 August 2015, 10:16:17.568 pm
UUID: 9b543eea-9025-4635-b176-188298a6a07e
Ancestors: Regex-Core-ul.38

- fix: use #injecto:into: instead of #detectMax: in RxsCharSet>>enumerableSetIgnoringCase:, because the latter returns the object instead of the maximum.

=============== Diff against Regex-Core-ul.38 ===============

Item was changed:
  ----- Method: RxsCharSet>>enumerableSetIgnoringCase: (in category 'privileged') -----
  enumerableSetIgnoringCase: aBoolean
  	"Answer a collection of characters that make up the portion of me that can be enumerated, or nil if there are no such characters."
  
  	| highestCharacterCode set |
+ 	highestCharacterCode := elements inject: -1 into: [ :max :each |
+ 		max := (each maximumCharacterCodeIgnoringCase: aBoolean) max: max ].
- 	highestCharacterCode := elements detectMax: [ :each |
- 		each maximumCharacterCodeIgnoringCase: aBoolean ].
  	highestCharacterCode = -1 ifTrue: [ ^nil ].
  	set := highestCharacterCode <= 255
  		ifTrue: [ CharacterSet new ]
  		ifFalse: [ WideCharacterSet new ].
  	elements do: [ :each |
  		each enumerateTo: set ignoringCase: aBoolean ].
  	^set!



More information about the Squeak-dev mailing list