[squeak-dev] The Trunk: Collections-ct.932.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Apr 7 21:02:42 UTC 2022

Christoph Thiede uploaded a new version of Collections to project The Trunk:

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

Name: Collections-ct.932
Author: ct
Time: 19 March 2021, 11:02:25.937058 pm
UUID: 557fe993-fe03-4e44-8723-ce0f8d597f9f
Ancestors: Collections-dtl.931

Fixes a bug in the fallback version of String>>#replaceFrom:to:with:startingAt:. If the replacement contains integers, they should be converted into Characters. See ByteArray>>#asString.

=============== Diff against Collections-dtl.931 ===============

Item was changed:
  ----- Method: String>>replaceFrom:to:with:startingAt: (in category 'private') -----
  replaceFrom: start to: stop with: replacement startingAt: repStart 
  	"Primitive. This destructively replaces elements from start to stop in the receiver starting at index, repStart, in the collection, replacement. Answer the receiver. Range checks are performed in the primitive only. Optional. See Object documentation whatIsAPrimitive."
  	<primitive: 105>
+ 	| index repOff |
+ 	repOff := repStart - start.
+ 	index := start - 1.
+ 	[(index := index + 1) <= stop]
+ 		whileTrue: [self at: index put: (replacement at: repOff + index) asCharacter].!
- 	super replaceFrom: start to: stop with: replacement startingAt: repStart!

More information about the Squeak-dev mailing list