[squeak-dev] The Trunk: Kernel-nice.371.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Jan 5 13:35:13 UTC 2010


Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-nice.371.mcz

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

Name: Kernel-nice.371
Author: nice
Time: 5 January 2010, 2:34:57 am
UUID: daad1ac4-4dd9-40ac-a271-79b28c02fde3
Ancestors: Kernel-dtl.370

Let allSubclasses and withAllSubclasses answer an OrderedCollection rather than a Set.

PORTABILITY ISSUES:: application that would need a Set should use an explicit asSet.

=============== Diff against Kernel-dtl.370 ===============

Item was changed:
  ----- Method: Behavior>>allSubclasses (in category 'accessing class hierarchy') -----
  allSubclasses
+ 	"Answer a Collection of the receiver's and the receiver's descendent's subclasses. "
- 	"Answer a Set of the receiver's and the receiver's descendent's subclasses. "
  
  	| scan scanTop |
  	scan := OrderedCollection withAll: self subclasses.
  	scanTop := 1.
  	[scanTop > scan size]
  		whileFalse: [scan addAll: (scan at: scanTop) subclasses.
  			scanTop := scanTop + 1].
+ 	^ scan!
- 	^ scan asSet!

Item was changed:
  ----- Method: Behavior>>withAllSubclasses (in category 'accessing class hierarchy') -----
  withAllSubclasses
+ 	"Answer a Collection of the receiver, the receiver's descendent's, and the  
- 	"Answer a Set of the receiver, the receiver's descendent's, and the  
  	receiver's descendent's subclasses."
  
+ 	^ self allSubclasses addFirst: self;
- 	^ self allSubclasses add: self;
  		 yourself!




More information about the Squeak-dev mailing list