From c272e400422af372d2f8f5039ec8a62369171a18 Mon Sep 17 00:00:00 2001 From: Juriy Zaytsev Date: Thu, 12 Nov 2009 21:17:37 -0500 Subject: [PATCH] Minor optimization in class module. --- src/lang/class.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lang/class.js b/src/lang/class.js index 1ac0750..3f59bb6 100644 --- a/src/lang/class.js +++ b/src/lang/class.js @@ -59,7 +59,7 @@ var Class = (function() { parent.subclasses.push(klass); } - for (var i = 0; i < properties.length; i++) + for (var i = 0, length = properties.length; i < length; i++) klass.addMethods(properties[i]); if (!klass.prototype.initialize) @@ -150,7 +150,7 @@ var Class = (function() { for (var i = 0, length = properties.length; i < length; i++) { var property = properties[i], value = source[property]; if (ancestor && Object.isFunction(value) && - value.argumentNames().first() == "$super") { + value.argumentNames()[0] == "$super") { var method = value; value = (function(m) { return function() { return ancestor[m].apply(this, arguments); };