The Trunk: Collections-eem.672.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Collections-eem.672.mcz

commits-2
Eliot Miranda uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-eem.672.mcz

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

Name: Collections-eem.672
Author: eem
Time: 12 November 2015, 5:21:54.525 pm
UUID: 9b35923c-464e-4b66-8541-2e307f79186b
Ancestors: Collections-mt.671

Only print ByteArrays as literals, not every subclass of ByteArray that doesn't have its own print method.

=============== Diff against Collections-mt.671 ===============

Item was added:
+ ----- Method: ByteArray>>printAsLiteralByteArrayOn: (in category 'printing') -----
+ printAsLiteralByteArrayOn: aStream
+
+ aStream nextPutAll: '#['.
+ self
+ do: [ :each | each printOn: aStream ]
+ separatedBy: [ aStream nextPut: $ ].
+ aStream nextPut: $]!

Item was changed:
  ----- Method: ByteArray>>printOn: (in category 'printing') -----
  printOn: aStream
 
+ self shouldBePrintedAsLiteral ifFalse:
+ [super printOn: aStream.
+ aStream space].
+ self printAsLiteralByteArrayOn: aStream!
- aStream nextPutAll: '#['.
- self
- do: [ :each | each printOn: aStream ]
- separatedBy: [ aStream nextPut: $ ].
- aStream nextPut: $]!

Item was added:
+ ----- Method: ByteArray>>storeAsLiteralByteArrayOn: (in category 'printing') -----
+ storeAsLiteralByteArrayOn: aStream
+ aStream nextPutAll: '#['.
+ self
+ do: [ :each | each storeOn: aStream ]
+ separatedBy: [ aStream nextPut: $ ].
+ aStream nextPut: $]!

Item was changed:
  ----- Method: ByteArray>>storeOn: (in category 'printing') -----
  storeOn: aStream
+ self shouldBePrintedAsLiteral
+ ifTrue: [self storeAsLiteralByteArrayOn: aStream]
+ ifFalse: [super storeOn: aStream]!
- aStream nextPutAll: '#['.
- self
- do: [ :each | each storeOn: aStream ]
- separatedBy: [ aStream nextPut: $ ].
- aStream nextPut: $]!