瀏覽代碼

Fixes GH-192

Herbert Vojčík 12 年之前
父節點
當前提交
440b615b37
共有 1 個文件被更改,包括 3 次插入4 次删除
  1. 3 4
      js/boot.js

+ 3 - 4
js/boot.js

@@ -335,9 +335,9 @@ function Smalltalk(){
 		}
 		imp = klass ? klass.fn.prototype[selector] : receiver.klass && receiver[selector];
 		if(imp) {
-			pushContext(receiver, selector, args);
+			var context = pushContext(receiver, selector, args);
 			call = imp.apply(receiver, args);
-			popContext();
+			popContext(context);
 			return call;
 		} else {
 			return messageNotUnderstood(receiver, selector, args);
@@ -431,8 +431,7 @@ function Smalltalk(){
 		return st.thisContext = c;
 	};
 
-	function popContext() {
-		var context = st.thisContext;
+	function popContext(context) {
 		st.thisContext = context.homeContext;
 		context.homeContext = undefined;
 		st.oldContext = context;