ImmutableArray.st
changeset 9237 86e0ef73d524
parent 8931 10da5e5ddb8e
child 12455 d34abbe4c841
--- a/ImmutableArray.st	Mon Mar 06 10:00:22 2006 +0100
+++ b/ImmutableArray.st	Mon Mar 06 10:00:27 2006 +0100
@@ -130,12 +130,7 @@
 creator 
     "find the method that contains me"
 
-    Method allSubInstances do:[:aMethod |
-        (aMethod referencesGlobal:self) ifTrue:[
-            ^ aMethod.
-        ].
-    ].
-    ^ nil
+    ^ Method allSubInstances detect:[:aMethod | (aMethod referencesGlobal:self)] ifNone:nil.
 
     " 
       #(1 2 3) creator
@@ -205,5 +200,5 @@
 !ImmutableArray class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ImmutableArray.st,v 1.22 2005-07-12 13:57:44 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ImmutableArray.st,v 1.23 2006-03-06 09:00:27 cg Exp $'
 ! !