--- a/MethodDictionary.st Wed Dec 24 16:37:31 2014 +0100
+++ b/MethodDictionary.st Fri Dec 26 15:56:48 2014 +0100
@@ -249,6 +249,23 @@
"Modified: / 08-08-2006 / 16:12:04 / cg"
!
+do:aBlock
+ "evaluate aBlock for each value (i.e. each method)"
+
+ |key value sz "{ Class: SmallInteger }"|
+
+ sz := self basicSize.
+ 1 to:sz by:2 do:[:i |
+ key := self basicAt:i.
+ key notNil ifTrue:[
+ value := self basicAt:(i+1).
+ value notNil ifTrue:[
+ aBlock value:value.
+ ]
+ ]
+ ].
+!
+
keysAndValuesDo:aBlock
"evaluate the 2 arg block aBlock for each key (i.e. each selector)
and each value (i.e. each method)"
@@ -376,9 +393,10 @@
!MethodDictionary class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/MethodDictionary.st,v 1.29 2011-07-20 15:52:04 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/MethodDictionary.st,v 1.30 2014-12-26 14:56:48 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/MethodDictionary.st,v 1.29 2011-07-20 15:52:04 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/MethodDictionary.st,v 1.30 2014-12-26 14:56:48 cg Exp $'
! !
+