// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
Buffer.prototype.copy = function copy (target, targetStart, start, end) {
+ if (target === undefined) {
+ throw new TypeError('argument should be a Buffer')
+ }
if (!start) start = 0
if (!end && end !== 0) end = this.length
if (targetStart >= target.length) targetStart = target.length
Buffer.poolSize = 0;
assert(Buffer.allocUnsafe(1).parent instanceof ArrayBuffer);
Buffer.poolSize = ps;
-
+*/
// Test Buffer.copy() segfault
assert.throws(() => Buffer.allocUnsafe(10).copy(),
/TypeError: argument should be a Buffer/);
-
+/*
var regErrorMsg =
new RegExp('The first argument must be one of type string, Buffer, ' +
'ArrayBuffer, Array, or Array-like Object\\.');