瀏覽代碼

fixes issue #520

Nicolas Petton 11 年之前
父節點
當前提交
59a22bf518
共有 1 個文件被更改,包括 7 次插入2 次删除
  1. 7 2
      js/boot.js

+ 7 - 2
js/boot.js

@@ -158,10 +158,14 @@ function Smalltalk() {
 		/* Dnu handler method */
 
 		createHandler: function (selector) {
-			return function () {
+			var handler = function() {
 				var args = Array.prototype.slice.call(arguments);
 				return messageNotUnderstood(this, selector, args);
 			};
+
+			handler.isAmberDNU = true;
+
+			return handler;
 		}
 	};
 
@@ -321,7 +325,8 @@ function Smalltalk() {
 	}
 
 	function installMethodIfAbsent(method, klass) {
-		if(!klass.fn.prototype[method.jsSelector]) {
+		var jsFunction = klass.fn.prototype[method.jsSelector];
+		if(!jsFunction || jsFunction.isAmberDNU) {
 			installMethod(method, klass);
 		}
 	}