#OTHER by cg
authorClaus Gittinger <cg@exept.de>
Wed, 05 Oct 2016 18:22:43 +0200
changeset 20543 38ca27f2eb66
parent 20542 3e1dc78e3346
child 20544 337f2148be55
#OTHER by cg class: Array changed: #refersToLiteral: #refersToLiteralMatching: use #isArray instead of class==Array (for ImmutableArrays)
Array.st
--- a/Array.st	Wed Oct 05 18:22:35 2016 +0200
+++ b/Array.st	Wed Oct 05 18:22:43 2016 +0200
@@ -303,7 +303,6 @@
     "Modified: 23.4.1996 / 15:55:06 / cg"
 ! !
 
-
 !Array methodsFor:'accessing'!
 
 at:index
@@ -1902,10 +1901,10 @@
      receiver refers to aLiteral (i.e. a deep search)"
 
     self do:[:el |
-	el == aLiteral ifTrue:[^true].
-	(el class == Array or:[el class == ImmutableArray]) ifTrue:[
-	    (el refersToLiteral: aLiteral) ifTrue: [^true]
-	]
+        el == aLiteral ifTrue:[^true].
+        el isArray ifTrue:[
+            (el refersToLiteral: aLiteral) ifTrue: [^true]
+        ]
     ].
     ^ false
 
@@ -1923,10 +1922,10 @@
      receiver is symbolic and matches aMatchPattern (i.e. a deep search)"
 
     self do:[ :el |
-	(el isSymbol and:[ aMatchPattern match: el]) ifTrue:[^true].
-	(el class == Array or:[el class == ImmutableArray]) ifTrue:[
-	    (el refersToLiteralMatching: aMatchPattern) ifTrue: [^true]
-	]
+        (el isSymbol and:[ aMatchPattern match: el]) ifTrue:[^true].
+        el isArray ifTrue:[
+            (el refersToLiteralMatching: aMatchPattern) ifTrue: [^true]
+        ]
     ].
     ^ false