Issue #79. Correctly setting 'this' in '_.wrap'

This commit is contained in:
Jeremy Ashkenas
2010-12-13 16:25:55 -05:00
parent 9a9f2a85da
commit 3a113d2d88
2 changed files with 6 additions and 1 deletions

View File

@@ -469,7 +469,7 @@
_.wrap = function(func, wrapper) {
return function() {
var args = [func].concat(slice.call(arguments));
return wrapper.apply(wrapper, args);
return wrapper.apply(this, args);
};
};