[Pkg] The Trunk: Collections-nice.175.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Oct 30 23:01:51 UTC 2009


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

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

Name: Collections-nice.175
Author: nice
Time: 31 October 2009, 12:01:10 pm
UUID: b57c4abc-b35c-430d-a8f1-28a4956dd753
Ancestors: Collections-nice.174

Implement Eliot suggestion to always print Array with a brace format (unless they are literal).
Thus I renamed #printAsSelfEvaluatingFormOn: -> #printAsBraceFormOn:

If community agree on this one, then more cleanup and removal will follow

=============== Diff against Collections-nice.174 ===============

Item was added:
+ ----- Method: Array>>printAsBraceFormOn: (in category 'self evaluating') -----
+ printAsBraceFormOn: aStream
+ 
+ 	aStream nextPut: ${.
+ 	self do: [:el | aStream print: el] separatedBy: [ aStream nextPutAll: ' . '].
+ 	aStream nextPut: $}!

Item was changed:
  ----- Method: Array>>printOn: (in category 'printing') -----
  printOn: aStream
+ 	self isLiteral ifTrue: [^self printAsLiteralFormOn: aStream].
+ 	self class = Array ifTrue: [^self printAsBraceFormOn: aStream].
+ 	^super printOn: aStream!
- 	self isLiteral ifTrue: [self printAsLiteralFormOn: aStream. ^ self].
- 	self isSelfEvaluating ifTrue: [self printAsSelfEvaluatingFormOn: aStream. ^ self].
- 
- 	super printOn: aStream!

Item was removed:
- ----- Method: Array>>printAsSelfEvaluatingFormOn: (in category 'self evaluating') -----
- printAsSelfEvaluatingFormOn: aStream
- 
- 	aStream nextPut: ${.
- 	self do: [:el | aStream print: el] separatedBy: [ aStream nextPutAll: ' . '].
- 	aStream nextPut: $}!



More information about the Packages mailing list