ByteArray.st
changeset 4783 49b1b2968a5c
parent 4778 df6189d4909e
child 4807 2991043fc36d
--- a/ByteArray.st	Tue Sep 21 02:23:30 1999 +0200
+++ b/ByteArray.st	Tue Sep 21 02:28:30 1999 +0200
@@ -1466,16 +1466,17 @@
      Notice: This operation modifies the receiver, NOT a copy;
      therefore the change may affect all others referencing the receiver."
 
-    (aCollection class == self class) ifTrue:[
-	^ self replaceBytesFrom:startIndex to:stopIndex with:aCollection startingAt:repStartIndex
+    ((aCollection class == self class) 
+    or:[aCollection class isBytes]) ifTrue:[
+        ^ self replaceBytesFrom:startIndex to:stopIndex with:aCollection startingAt:repStartIndex
     ].
     ^ super replaceFrom:startIndex to:stopIndex with:aCollection startingAt:repStartIndex
 
     "
      args:    startIndex            : <integer>
-	      stopIndex             : <integer>
-	      replacementCollection : <collection of <bytes> >
-	      repStartIndex         : <integer>
+              stopIndex             : <integer>
+              replacementCollection : <collection of <bytes> >
+              repStartIndex         : <integer>
 
      returns: self
     "
@@ -2352,5 +2353,5 @@
 !ByteArray class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ByteArray.st,v 1.118 1999-09-20 13:53:23 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ByteArray.st,v 1.119 1999-09-21 00:28:30 cg Exp $'
 ! !