[Pkg] The Trunk: Collections-ar.347.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Mar 26 03:49:46 UTC 2010


Andreas Raab uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-ar.347.mcz

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

Name: Collections-ar.347
Author: ar
Time: 25 March 2010, 8:49:08.296 pm
UUID: b9932ad8-3c74-d548-a744-5b0f3d35a784
Ancestors: Collections-ul.346, Collections-ul.345

Merging Collections-ul.345:

- implement #backChunk with #back instead of #oldBack

=============== Diff against Collections-ul.346 ===============

Item was changed:
  ----- Method: PositionableStream>>backChunk (in category 'fileIn/Out') -----
  backChunk
  	"Answer the contents of the receiver back to the previous terminator character.  Doubled terminators indicate an embedded terminator character."
  
+ 	| output character |
+ 	output := WriteStream on: (String new: 1000).
+ 	self back. "oldBack compatibility"
+ 	[ (character := self back) == nil ] whileFalse: [
+ 		character == $!! ifTrue: [
+ 			self back == $!! ifFalse: [ 
+ 				self skip: 2. "oldBack compatibility"
+ 				^output contents reversed ] ].
+ 		output nextPut: character].
+ 	self skip: 1. "oldBack compatibility"
+ 	^output contents reversed!
- 	| terminator out ch |
- 	terminator := $!!.
- 	out := WriteStream on: (String new: 1000).
- 	[(ch := self oldBack) == nil] whileFalse: 
- 			[ch == terminator 
- 				ifTrue: 
- 					[self peekBack == terminator 
- 						ifTrue: [self oldBack	"skip doubled terminator"]
- 						ifFalse: [^ out contents reversed]].
- 			out nextPut: ch].
- 	^ out contents reversed!



More information about the Packages mailing list