a = b vs. b = a if any is a string
authorfm
Wed, 14 Jun 2006 11:49:49 +0200
changeset 9366 218fa4e2b183
parent 9365 9003f8432516
child 9367 d1a72d40968a
a = b vs. b = a if any is a string
SequenceableCollection.st
--- a/SequenceableCollection.st	Wed Jun 14 11:23:16 2006 +0200
+++ b/SequenceableCollection.st	Wed Jun 14 11:49:49 2006 +0200
@@ -1259,12 +1259,13 @@
 
     (aCollection == self) ifTrue:[^true].
     (aCollection isSequenceable) ifFalse:[^false].
+    (aCollection species = self species) ifFalse:[^false].
 
     stop := self size.
     stop == (aCollection size) ifFalse:[^false].
 
     1 to:stop do:[:index|
-	(self at:index) = (aCollection at:index) ifFalse:[^false].
+        (self at:index) = (aCollection at:index) ifFalse:[^false].
     ].
     ^ true
 
@@ -6960,7 +6961,7 @@
 !SequenceableCollection class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/SequenceableCollection.st,v 1.235 2006-05-09 09:44:30 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/SequenceableCollection.st,v 1.236 2006-06-14 09:49:49 fm Exp $'
 ! !
 
 SequenceableCollection initialize!