[squeak-dev] The Inbox: Multilingual-tonyg.218.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Feb 23 19:14:06 UTC 2017


A new version of Multilingual was added to project The Inbox:
http://source.squeak.org/inbox/Multilingual-tonyg.218.mcz

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

Name: Multilingual-tonyg.218
Author: tonyg
Time: 23 February 2017, 2:13:59.45456 pm
UUID: 86e12680-7d6d-400c-8215-62a8315f01f1
Ancestors: Multilingual-tfel.217

Override PositionableStream>>#upToPosition:, introduced in Collections-tonyg.734, in order to reflect the fact that positions count bytes here; previously, #next: was being used, but that method expects a count of characters, not bytes. This is the second half of a fix for Mantis #4665. See also MultilingualTests-tonyg.22.

=============== Diff against Multilingual-tfel.217 ===============

Item was added:
+ ----- Method: MultiByteFileStream>>upToPosition: (in category 'accessing') -----
+ upToPosition: anInteger
+ 	"Answer a subcollection containing items starting from the current position and ending including the given position. Usefully different to #next: in that positions measure *bytes* from the file, where #next: wants to measure *characters*."
+ 	^self collectionSpecies new: 1000 streamContents: [ :stream |
+ 		| ch |
+ 		[ (ch := self next) == nil or: [ position > anInteger ] ] 
+ 			whileFalse: [ stream nextPut: ch ] ]!



More information about the Squeak-dev mailing list