[squeak-dev] The Trunk: Traits-ar.281.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Mar 5 05:14:55 UTC 2010

Andreas Raab uploaded a new version of Traits to project The Trunk:

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

Name: Traits-ar.281
Author: ar
Time: 4 March 2010, 9:14:46.573 pm
UUID: 787c91fc-51ce-3245-ab67-a8e669838785
Ancestors: Traits-nice.280

Fix a tiny buglet in Traits using #includes: instead of #includesKey: for its name.

=============== Diff against Traits-nice.280 ===============

Item was changed:
  ----- Method: Trait>>setName:andRegisterInCategory:environment: (in category 'initialize') -----
  setName: aSymbol andRegisterInCategory: categorySymbol environment: aSystemDictionary
  	(self isValidTraitName: aSymbol) ifFalse: [self error:'Invalid trait name'].
  	(self environment == aSystemDictionary
  		and: [self name = aSymbol
  			and: [self category = categorySymbol]]) ifTrue: [^self].
+ 	((aSystemDictionary includesKey: aSymbol) and: [(aSystemDictionary at: aSymbol) ~~ self])
- 	((aSystemDictionary includes: aSymbol) and: [(aSystemDictionary at: aSymbol) ~~ self])
  		ifTrue: [self error: 'The name ''' , aSymbol , ''' is already used'].
  	(self environment notNil and: [self name notNil and: [self name ~= aSymbol]]) ifTrue: [
  		self environment renameClass: self as: aSymbol].
  	self name: aSymbol.
  	self environment: aSystemDictionary.	
  	self environment at: self name put: self.
  	self environment organization classify: self name under: categorySymbol.
  	^ true!

More information about the Squeak-dev mailing list