j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Andres Valloud wrote:
Fixes a bug in SequenceableCollection>>forceTo:paddingWith: introduced in update #2018. Executing ''asdf' forceTo: 3 paddingWith: $-' was causing an error, instead of being truncated. This new version still includes the optimizations from #2018, but with an extra check to handle this case.
Hmmmm... I think it would be better to remove the comment in from:to:put: regarding the bound check, and then insert a line at the beginning of the method with something like:
startIndex > endIndex ifTrue: [^self].
Yes, you're right. Somehow it didn't occur to me that the current forceTo:paddingWith: was very close to working as is.
- Doug Way dway@riskmetrics.com
squeak-dev@lists.squeakfoundation.org