diff --git a/lib/class.js b/lib/class.js index 58c99d3..f9b5058 100644 --- a/lib/class.js +++ b/lib/class.js @@ -78,6 +78,8 @@ exports.abstractMethod = function( definition ) function Class() {}; + + /** * Copies properties to the destination object * @@ -445,13 +447,9 @@ function attach_extend( func ) * * @return {Object} extended class */ - var ext_method = function( props ) + define_secure_prop( func, 'extend', function( props ) { return extend( this, props ); - }; - - // if defineProperty is unsupported, do it the old fashioned way (it's just - // less restrictive) - define_secure_prop( func, 'extend', ext_method ); + }); }