[squeak-dev] The Trunk: Multilingual-mt.278.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Apr 15 09:22:31 UTC 2022


Marcel Taeumel uploaded a new version of Multilingual to project The Trunk:
http://source.squeak.org/trunk/Multilingual-mt.278.mcz

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

Name: Multilingual-mt.278
Author: mt
Time: 15 April 2022, 11:22:29.450751 am
UUID: e57005f8-917f-5d45-9816-7bac3873c3f5
Ancestors: Multilingual-mt.277

Fixes a regression in #nextChunk where the last character was ignored, which is problematic if that character is valid syntax at the end of a file. There are still files out there that do not have a line-ending character at the end such as install scripts in SqueakMap.

=============== Diff against Multilingual-mt.277 ===============

Item was changed:
  ----- Method: MultiByteFileStream>>basicUpTo: (in category 'private basic') -----
  basicUpTo: delimiter
  	"Answer a subcollection from the current access position to the occurrence (if any, but not inclusive) of delimiter in the receiver. If delimiter is not in the collection, answer the entire rest of the receiver. Ignore both character encoding and line end conversion."
  	
+ 	| start end found result |
- 	| start end result |
  	collection ifNotNil: [
  		(position < readLimit and: [
  			(end := collection indexOf: delimiter startingAt: position + 1) > 0 and: [
  				end <= readLimit ] ]) ifTrue: [
  					^collection copyFrom: position + 1 to: (position := end) - 1 ] ].
  	start := self position.
+ 	found := self basicSkipTo: delimiter.
- 	self basicSkipTo: delimiter.
  	end := self position.
+ 	found ifTrue: [end := end - 1].
  	self position: start.
  	 "File position may be set to a value greater than the file's size. Make sure the argument is not negative."
+ 	result := self basicNext: (end - start max: 0).
- 	result := self basicNext: (end - start - 1 max: 0).
  	"Read the delimiter itself. Noop when #atEnd."
  	self basicNext.
  	^result!



More information about the Squeak-dev mailing list