소스 검색

Only one toString for all Behaviors

Herbert Vojčík 11 년 전
부모
커밋
b45ef6cda8
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 4 4
      support/boot.js

+ 4 - 4
support/boot.js

@@ -379,15 +379,15 @@ function ClassesBrik(brikz, st) {
 		return that;
 	}
 
+	SmalltalkBehavior.prototype.toString = function () {
+		return 'Smalltalk ' + this.className;
+	};
+
 	function setupClass(klass, spec) {
 		spec = spec || {};
 		klass.iVarNames = spec.iVarNames || [];
 		klass.pkg = spec.pkg;
 
-		Object.defineProperty(klass, "toString", {
-			value: function() { return 'Smalltalk ' + this.className; },
-			enumerable:false, configurable: true, writable: false
-		});
 		org.setupClassOrganization(klass);
 		Object.defineProperty(klass, "methods", {
 			value: {},