[squeak-dev] The Inbox: Files-dtl.184.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Oct 25 02:15:35 UTC 2019


David T. Lewis uploaded a new version of Files to project The Inbox:
http://source.squeak.org/inbox/Files-dtl.184.mcz

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

Name: Files-dtl.184
Author: dtl
Time: 24 October 2019, 10:15:34.856587 pm
UUID: cfa02841-644b-49cb-b3f2-a0eb1b36707b
Ancestors: Files-pre.183

Provide error handling for #adoptInstance in StandardFileStream>>binary to provide pre-Spur behavior when running on a V3 image. Prior to Spur, class ByteArray cannot adopt an instance of ByteString, so use #asByteArray instead.

Resolves the only remaining difference for package Files when running on either Spur or V3 images. The packages with significant Spur/V3 differences (excluding unit tests) are now Collections, Compiler, Kernel, and System. See www.squeaksource.com/TrunkUpdateStreamV3 for verification.

=============== Diff against Files-pre.183 ===============

Item was changed:
  ----- Method: StandardFileStream>>binary (in category 'properties-setting') -----
  binary
  	"Read and/or write in binary mode."
  	buffer1
  		ifNil: [ buffer1 := ByteArray new: 1 ]
+ 		ifNotNil: [ [ ByteArray adoptInstance: buffer1 ]
+ 						on: Error "V3 image"
+ 						do: [ buffer1 := ByteArray new: 1 ] ].
+ 	collection ifNotNil: [ [ ByteArray adoptInstance: collection ]
+ 							on: Error
+ 							do: [ collection := collection asByteArray ] ].
- 		ifNotNil: [ ByteArray adoptInstance: buffer1 ].
- 	collection ifNotNil: [ ByteArray adoptInstance: collection ].
  	lastWritten ifNotNil:
  		[ lastWritten isCharacter ifTrue: [ lastWritten := lastWritten asInteger ] ]!



More information about the Squeak-dev mailing list