[squeak-dev] The Trunk: Collections-eem.471.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Apr 9 00:16:57 UTC 2012


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

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

Name: Collections-eem.471
Author: eem
Time: 8 April 2012, 5:16:02.533 pm
UUID: ddf0731e-45e0-42a2-bd10-7f65ab12fe6f
Ancestors: Collections-nice.470

Fix TranscriptStream>ensureEndsWith: & ensureCr

=============== Diff against Collections-nice.470 ===============

Item was changed:
  WriteStream subclass: #TranscriptStream
+ 	instanceVariableNames: 'lastChar'
- 	instanceVariableNames: ''
  	classVariableNames: 'AccessSema'
  	poolDictionaries: ''
  	category: 'Collections-Streams'!
  
  !TranscriptStream commentStamp: '<historical>' prior: 0!
  This class is a much simpler implementation of Transcript protocol that supports multiple views and very simple conversion to morphic.  Because it inherits from Stream, it is automatically compatible with code that is designe to write to streams.!

Item was added:
+ ----- Method: TranscriptStream>>contents (in category 'accessing') -----
+ contents
+ 	^AccessSema critical:
+ 		[| contents sz |
+ 		contents := super contents. (sz := contents size) > 0 ifTrue:
+ 			[lastChar := contents at: sz].
+ 		contents]!

Item was added:
+ ----- Method: TranscriptStream>>ensureEndsWith: (in category 'accessing') -----
+ ensureEndsWith: anObject
+ 	"Append anObject to the receiver IFF there is not one on the end."
+ 
+ 	lastChar = anObject ifTrue: [^self].
+ 	super ensureEndsWith: anObject!



More information about the Squeak-dev mailing list