#OTHER by cg
class: Array
changed:
#refersToLiteral:
#refersToLiteralMatching:
use #isArray instead of class==Array (for ImmutableArrays)
--- 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