[squeak-dev] The Trunk: Monticello-ul.445.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Mar 23 13:07:37 UTC 2011


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

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

Name: Monticello-ul.445
Author: ul
Time: 23 March 2011, 6:41:45.063 am
UUID: 875938f4-22a0-9c48-ac04-e9e250cf4124
Ancestors: Monticello-ul.444

- faster MCVersionName >> #versionName

=============== Diff against Monticello-ul.444 ===============

Item was changed:
  ----- Method: MCVersionName>>versionName (in category 'accessing') -----
  versionName
  	"Answer my version name as a ByteString, without the file suffix or any ancestor-attributes."
+ 	
+ 	| end |
+ 	(self last between: $0 and: $9)
+ 		ifTrue: [ end := self size ]
+ 		ifFalse: [
+ 			end := (self lastIndexOf: $. ifAbsent: [ self size + 1 ]) - 1.
+ 			end := end min: (self indexOf: $( ifAbsent: [ self size + 1 ]) - 1 ].
+ 	^self first: end!
- 	^ self last isDigit
- 		ifTrue:
- 			[ "The whole of me, but convert to a ByteString"
- 			self
- 				copyFrom: 1
- 				to: self size ]
- 		ifFalse: [ (self copyUpToLast: $.) copyUpTo: $( ]!




More information about the Squeak-dev mailing list