[squeak-dev] The Trunk: Environments-cmm.53.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Jan 18 23:44:39 UTC 2015

Chris Muller uploaded a new version of Environments to project The Trunk:

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

Name: Environments-cmm.53
Author: cmm
Time: 16 January 2015, 2:54:24.767 pm
UUID: 69b32fc7-98f1-4c19-9976-a38106a9ee63
Ancestors: Environments-cmm.52

- Only change key when it is NOT in the 'bindings' Dictionary, otherwise it would be in a state inconsistent with its new hash.

=============== Diff against Environments-cmm.51 ===============

Item was changed:
  ----- Method: Environment>>renameClass:from:to: (in category 'classes and traits') -----
  renameClass: aClass from: oldName to: newName
  	"Rename the class, aClass, to have the title newName."
  	| binding category |
  	category := self organization categoryOfElement: oldName.
  	self organization classify: newName under: category suppressIfDefault: true.
  	self organization removeElement: oldName.
+ 	binding := self associationAt: oldName.
- 	binding := self declarationOf: oldName.
  	declarations removeKey: oldName.
+ 	bindings removeKey: oldName.
+ "	self binding: binding removedFrom: self."
- 	self binding: binding removedFrom: self.
+ 	binding key: newName.
+ 	declarations add: binding.
+ 	bindings add: binding.
+ "	self binding: binding addedTo: self."
- 	binding := newName => aClass.
- 	declarations add: binding. 
- 	self binding: binding addedTo: self.
  	Smalltalk renamedClass: aClass from: oldName to: newName.
  	SystemChangeNotifier uniqueInstance 
  		classRenamed: aClass 
  		from: oldName 
  		to: newName 
  		inCategory: category!

More information about the Squeak-dev mailing list