#REFACTORING by exept
class: OrderedCollection
changed: #replaceFrom:to:with:startingAt:
--- a/OrderedCollection.st Fri Nov 08 09:05:28 2019 +0100
+++ b/OrderedCollection.st Fri Nov 08 09:06:25 2019 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
@@ -1704,21 +1706,21 @@
|end|
end := stop + firstIndex - 1.
- ((start >= 1) and:[end <= lastIndex]) ifTrue:[
- aCollection class == self class ifTrue:[
- contentsArray
- replaceFrom:(start + firstIndex - 1)
- to:end
- with:aCollection contentsArray
- startingAt:(repStart + aCollection firstIndex - 1).
- ] ifFalse:[
- contentsArray
- replaceFrom:(start + firstIndex - 1)
- to:end
- with:aCollection
- startingAt:repStart.
- ].
- ^ self
+ ((start > 0) and:[end <= lastIndex]) ifTrue:[
+ aCollection class == self class ifTrue:[
+ contentsArray
+ replaceFrom:(start + firstIndex - 1)
+ to:end
+ with:aCollection contentsArray
+ startingAt:(repStart + aCollection firstIndex - 1).
+ ] ifFalse:[
+ contentsArray
+ replaceFrom:(start + firstIndex - 1)
+ to:end
+ with:aCollection
+ startingAt:repStart.
+ ].
+ ^ self
].
^ super replaceFrom:start to:stop with:aCollection startingAt:repStart