Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.849.mcz==================== Summary ====================
Name: System-mt.849
Author: mt
Time: 29 July 2016, 3:48:10.227103 pm
UUID: 5adcb3ba-a052-e84f-9b7b-a176d4acff98
Ancestors: System-mt.848
Adds some convenience methods to get more information about the current system version.
=============== Diff against System-mt.848 ===============
Item was added:
+ ----- Method: SystemVersion>>isAlpha (in category 'testing') -----
+ isAlpha
+ ^ (version endsWith: #alpha)!
Item was added:
+ ----- Method: SystemVersion>>isCodeFreeze (in category 'testing') -----
+ isCodeFreeze
+ ^ self isFeatureFreeze and: [(version endsWith: #beta) not]!
Item was added:
+ ----- Method: SystemVersion>>isFeatureFreeze (in category 'testing') -----
+ isFeatureFreeze
+ ^ self isAlpha not!
Item was added:
+ ----- Method: SystemVersion>>isRelease (in category 'testing') -----
+ isRelease
+ ^ self isReleaseCandidate not and: [version last isDigit]!
Item was added:
+ ----- Method: SystemVersion>>isReleaseCandidate (in category 'testing') -----
+ isReleaseCandidate
+ ^ (version findTokens: 'rc') size > 1!
Item was added:
+ ----- Method: SystemVersion>>majorVersionNumber (in category 'accessing') -----
+ majorVersionNumber
+
+ ^ (version copyFrom: 'Squeak' size to: (version indexOf: $.)) asInteger!
Item was added:
+ ----- Method: SystemVersion>>minorVersionNumber (in category 'accessing') -----
+ minorVersionNumber
+
+ | pointIndex |
+ pointIndex := version indexOf: $..
+ ^ (version
+ copyFrom: pointIndex
+ to: (self isRelease
+ "e.g. Squeak5.1"
+ ifTrue: [version size]
+ "e.g. Squeak5.1rc5"
+ ifFalse: [(pointIndex+1 to: version size) detect: [:ea | (version at: ea) isDigit not]])) asInteger!
Item was added:
+ ----- Method: SystemVersion>>releaseCandidateNumber (in category 'accessing') -----
+ releaseCandidateNumber
+ ^ self isReleaseCandidate
+ ifFalse: [0]
+ ifTrue: [(version findTokens: 'rc') last asInteger]!