From 707fa6375662c7ae31daaf38662f02b914db2e68 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Sat, 9 Jan 2016 15:27:42 +0100 Subject: [PATCH] remove saved _set reference --- index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index d028aa5..1ee0410 100644 --- a/index.js +++ b/index.js @@ -225,7 +225,6 @@ function fromJsonObject (that, object) { if (Buffer.TYPED_ARRAY_SUPPORT) { Buffer.prototype.__proto__ = Uint8Array.prototype - Buffer.prototype._set = Uint8Array.prototype.set // For `copy` below. Buffer.__proto__ = Uint8Array } else { // pre-set for values that may exist in the future @@ -1285,7 +1284,11 @@ Buffer.prototype.copy = function copy (target, targetStart, start, end) { target[i + targetStart] = this[i + start] } } else { - target._set(this.subarray(start, start + len), targetStart) + Uint8Array.prototype.set.call( + target, + this.subarray(start, start + len), + targetStart + ) } return len @@ -1337,9 +1340,6 @@ Buffer._augment = function _augment (arr) { arr.constructor = Buffer arr._isBuffer = true - // save reference to original Uint8Array set method before overwriting - arr._set = arr.set - // deprecated arr.get = BP.get arr.set = BP.set -- 2.34.1