Underscore 0.5.5, with a fix for OOP-wrapping in MobileSafari, thanks to terrcin.

This commit is contained in:
Jeremy Ashkenas
2010-01-09 19:34:32 -05:00
parent 6866ffb840
commit cda9099a21
3 changed files with 14 additions and 8 deletions

View File

@@ -38,7 +38,7 @@
propertyIsEnumerable = Object.prototype.propertyIsEnumerable;
// Current version.
_.VERSION = '0.5.4';
_.VERSION = '0.5.5';
// ------------------------ Collection Functions: ---------------------------
@@ -600,8 +600,9 @@
_.each(_.functions(_), function(name) {
var method = _[name];
wrapper.prototype[name] = function() {
unshift.call(arguments, this._wrapped);
return result(method.apply(_, arguments), this._chain);
var args = _.toArray(arguments);
unshift.call(args, this._wrapped);
return result(method.apply(_, args), this._chain);
};
});