diff --git a/lib/buffer.js b/lib/buffer.js index f6eb984cbcc..c6266428d97 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -239,7 +239,7 @@ Buffer.prototype.inspect = function inspect() { var str = ''; var max = exports.INSPECT_MAX_BYTES; if (this.length > 0) { - str = this.hexSlice(0, max).match(/.{2}/g).join(' '); + str = this.toString('hex', 0, max).match(/.{2}/g).join(' '); if (this.length > max) str += ' ... '; }