--- a/Behavior.st Sat Jul 27 16:30:06 2019 +0200
+++ b/Behavior.st Sun Jul 28 00:59:28 2019 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
"
COPYRIGHT (c) 1988 by Claus Gittinger
All Rights Reserved
@@ -1331,13 +1329,23 @@
selectorsWithArgs:numberOfArgs
"Return all selectors defined in this class that take this number of arguments."
- ^ self selectors
- select:[:sel | sel argumentCount == numberOfArgs]
-
- "
- SmallInteger selectorsWithArgs:0
- SmallInteger selectorsWithArgs:2
- SmallInteger selectorsWithArgs:3
+ |selectors|
+
+ selectors := OrderedCollection new.
+ (self methodDictionary ? #()) keysDo:[:sel |
+ sel argumentCount == numberOfArgs ifTrue:[
+ selectors add:sel
+ ]
+ ].
+ ^ selectors
+"/ ^ self selectors
+"/ select:[:sel | sel argumentCount == numberOfArgs]
+
+ "
+ SmallInteger selectorsWithArgs:0
+ SmallInteger selectorsWithArgs:1
+ SmallInteger selectorsWithArgs:2
+ SmallInteger selectorsWithArgs:3
SmallInteger selectorsWithArgs:4
"
!