rem: var args = Array.apply(null, arguments); args.unshift(this); 
add: var args = [this]; for(var i = 0; i < arguments.length; ++i) args.push(arguments[i]); 
context: Divmod.Class.subclass = function(/* optional */ className) {    var superClass = this;    var subClass = function() {        return Divmod.Class.apply(this, arguments)    };    subClass.prototype = new superClass(Divmod._PROTOTYPE_ONLY);    subClass.subclass = Divmod.Class.subclass;    /* Copy class methods and attributes, so that you can do     * polymorphism on class methods (useful for things like     * Nevow.Athena.Widget.get in widgets.js).     */    for (var varname in superClass) {        if ((varname != 'prototype') &&            (varname != 'constructor') &&            (superClass[varname] != undefined)) {            subClass[varname] = superClass[varname];        }    }    subClass.upcall = function(otherThis, methodName) {        var funcArgs = [];        for (var i = 2; i < arguments.length; ++i) {            funcArgs.push(arguments[i]);        }        var superResult = superClass.prototype[methodName].apply(otherThis, funcArgs);        return superResult;    };    subClass.method = function(methodName, methodFunction) {        if (methodFunction != undefined) {            Divmod.debug('deprecation', 'method() just takes a function now (called with name = ' + methodName +').');        } else {            methodFunction = methodName;            methodName = methodFunction.name;        }        if (methodName == undefined) {            /* Sorry (IE).             */            var methodSource = methodFunction.toString();            methodName = methodSource.slice(methodSource.indexOf(' ') + 1, methodSource.indexOf('('));        }	subClass.prototype[methodName] = function() {	    var args = Array.apply(null, arguments);	    args.unshift(this);	    return methodFunction.apply(this, args);	};    };    /**       Not quite sure what to do with this...    **/    Divmod.__classDebugCounter__ += 1;    subClass.__classDebugCounter__ = Divmod.__classDebugCounter__;    subClass.toString = function() {        if (className == undefined) {            return '<Class #' + subClass.__classDebugCounter__ + '>';        } else {            return '<Class ' + className + '>';        }    };    subClass.prototype.toString = function() {        if (className == undefined) {            return '<"Instance" of #' + subClass.__classDebugCounter__ + '>';        } else {            return '<"Instance" of ' + className + '>';        }    };    return subClass;};
meta: 1565	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1565/491e2bc061efdc210e22909d01f34e07c7f91c21/athena.js/buggy/nevow/athena.js