Tobias Pape uploaded a new version of Environments to project Squeak 4.5:
http://source.squeak.org/squeak45/Environments-topa.54.mcz==================== Summary ====================
Name: Environments-topa.54
Author: topa
Time: 20 January 2015, 4:12:36.674 pm
UUID: b55bd16f-c2c0-4927-b170-4954383dd63f
Ancestors: Environments-cmm.53
Update literal bindings in compiled methods when renaming a class.
Restores working behavior of pre-Squeak4.5.
=============== Diff against Environments-cmm.53 ===============
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 declarationOf: oldName.
- binding := self associationAt: oldName.
declarations removeKey: oldName.
+ self binding: binding removedFrom: self.
+ undeclared removeKey: oldName.
+
+ binding becomeForward: (newName => aClass).
+ declarations add: binding.
+ self binding: binding addedTo: self.
- bindings removeKey: oldName.
- " self binding: binding removedFrom: self."
- binding key: newName.
- declarations add: binding.
- bindings add: binding.
- " self binding: binding addedTo: self."
-
Smalltalk renamedClass: aClass from: oldName to: newName.
SystemChangeNotifier uniqueInstance
classRenamed: aClass
from: oldName
to: newName
inCategory: category!