From 1ff94088853772af91b6e809157a24400c289817 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Sun, 19 Dec 2010 00:12:41 -0500 Subject: [PATCH] Rearranged util.overrideMethod() arguments to match methodOverride propCopy() action (to avoid unnecessary mistakes and confusion) --- lib/class.js | 2 +- lib/util.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/class.js b/lib/class.js index c3046ad..5f776c9 100644 --- a/lib/class.js +++ b/lib/class.js @@ -126,7 +126,7 @@ var extend = ( function( extending ) methodOverride: function( name, pre, func ) { return util.overrideMethod( - pre, func, name, result_data.abstractMethods + name, pre, func, result_data.abstractMethods ); }, } ); diff --git a/lib/util.js b/lib/util.js index c526092..5d4edfe 100644 --- a/lib/util.js +++ b/lib/util.js @@ -262,7 +262,7 @@ exports.propCopy = function( props, dest, actions ) var override_func = use_or( actions.methodOverride, function( name, pre, func ) { - return exports.overrideMethod( pre, func, name ); + return exports.overrideMethod( name, pre, func ); } ); @@ -341,15 +341,15 @@ exports.isAbstractMethod = function( func ) * * The given method must be a function or an exception will be thrown. * + * @param {string} name method name * @param {Function} super_method method to override * @param {Function} new_method method to override with - * @param {string} name method name * @param {Array.=} abstract_methods list of abstract methods * * @return {Function} overridden method */ exports.overrideMethod = function( - super_method, new_method, name, abstract_methods + name, super_method, new_method, abstract_methods ) { abstract_methods = abstract_methods || [];