Browse Source

Moved MethodContext >> asString to protocol converting

Nicolas Petton 11 years ago
parent
commit
baa1f1ec32
2 changed files with 9 additions and 7 deletions
  1. 1 1
      js/Kernel-Methods.js
  2. 8 6
      st/Kernel-Methods.st

+ 1 - 1
js/Kernel-Methods.js

@@ -983,7 +983,7 @@ smalltalk.addMethod(
 "_asString",
 smalltalk.method({
 selector: "asString",
-category: 'accessing',
+category: 'converting',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
var $2,$1;

+ 8 - 6
st/Kernel-Methods.st

@@ -355,12 +355,6 @@ Current limitation: MethodContext instances are not created on Block evaluation.
 
 !MethodContext methodsFor: 'accessing'!
 
-asString
-	^self isBlockContext 
-    	ifTrue: [ 'a block (in ', self methodContext receiver class printString, ')' ]
-      	ifFalse: [ self receiver class printString, ' >> ', self selector ]
-!
-
 home
 	<return self.methodContext || self.homeContext>
 !
@@ -411,6 +405,14 @@ temps
 	^ self locals
 ! !
 
+!MethodContext methodsFor: 'converting'!
+
+asString
+	^self isBlockContext 
+    	ifTrue: [ 'a block (in ', self methodContext receiver class printString, ')' ]
+      	ifFalse: [ self receiver class printString, ' >> ', self selector ]
+! !
+
 !MethodContext methodsFor: 'testing'!
 
 isBlockContext