Fix unit tests and reduce object/array references.

Former-commit-id: 25aaabd506cb4515cf833ebb104ba0146e4354dd
This commit is contained in:
John-David Dalton
2012-10-23 22:16:53 -07:00
parent dfcde8171e
commit 1825dd916e
2 changed files with 49 additions and 48 deletions

View File

@@ -42,7 +42,12 @@
var freeze = Object.freeze;
/** Used to set property descriptors */
var setDescriptor = Object.defineProperty;
var setDescriptor = (function(fn) {
try {
var o = {};
return fn(o, o, o) && fn;
} catch(e) { }
}(Object.defineProperty));
/** Shortcut used to convert array-like objects to arrays */
var slice = [].slice;
@@ -1810,7 +1815,6 @@
var funcs = _.without.apply(_, [_.functions(_)].concat([
'_',
'_iteratorTemplate',
'_shimKeys',
'after',
'bind',
'bindAll',