Cleanup arrayReg and splice references.

This commit is contained in:
John-David Dalton
2013-12-29 15:49:26 -06:00
parent 95be8b2cf3
commit 106fa64060
7 changed files with 43 additions and 70 deletions

View File

@@ -529,16 +529,9 @@
String = context.String,
TypeError = context.TypeError;
/**
* Used for `Array` method references.
*
* Normally `Array.prototype` would suffice, however, using an array literal
* avoids issues in Narwhal.
*/
var arrayRef = [];
/** Used for native method references */
var errorProto = Error.prototype,
var arrayRef = Array.prototype,
errorProto = Error.prototype,
objectProto = Object.prototype,
stringProto = String.prototype;
@@ -827,7 +820,7 @@
* @memberOf _.support
* @type boolean
*/
support.spliceObjects = (arrayRef.splice.call(object, 0, 1), !object[0]);
support.spliceObjects = (splice.call(object, 0, 1), !object[0]);
/**
* Detect lack of support for accessing string characters by index.