Method.st
branchjv
changeset 21246 958aa6e341d4
parent 21024 8734987eb5c7
parent 21157 c4dc25f898da
child 22909 2669c1bd20a5
--- a/Method.st	Tue Dec 20 10:11:20 2016 +0000
+++ b/Method.st	Thu Dec 22 23:00:47 2016 +0000
@@ -1059,6 +1059,7 @@
     "Modified (format): / 18-11-2011 / 14:47:06 / cg"
 ! !
 
+
 !Method methodsFor:'accessing-visibility'!
 
 isIgnored
@@ -1980,7 +1981,8 @@
     classAndSelector notNil ifTrue:[
         (classAndSelector methodClass) name printOn:aStream.
         "/ print out in a form that can directly be evaluated (>> is a selector in Behavior)
-        "/ aStream nextPutAll:'  '.
+        "/ in order to not break existing code which parses those strings,
+        "/ do not replace '>>' by '  '
         aStream nextPutAll:' >> '.
         (classAndSelector methodSelector) printOn:aStream.
     ] ifFalse:[
@@ -2027,6 +2029,27 @@
     "
 
     "Modified: 1.11.1996 / 16:27:04 / cg"
+!
+
+whoStringWith:sep
+    "return a string like className>>selector, 
+     if this is not an unbound method.
+     Otherwise return 'unbound'. Used with debugging."
+
+    |who|
+
+    who := self who.
+    who notNil ifTrue:[
+        ^ who methodClass name , sep , (who methodSelector storeString)
+    ].
+    ^ 'unboundMethod'
+
+    "
+     Method new whoStringWith:' >> '
+     (Method compiledMethodAt:#whoString) whoStringWith:' >> '
+     (Method compiledMethodAt:#whoString) whoStringWith:'  '
+     (Method compiledMethodAt:#whoString) whoStringWith:' -> '
+    "
 ! !
 
 !Method methodsFor:'private'!
@@ -3760,6 +3783,7 @@
     "Created: / 23-07-2012 / 11:16:36 / cg"
 ! !
 
+
 !Method methodsFor:'source management'!
 
 revisionInfo