| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 0ab008e commit 212da12
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -527,7 +527,7 @@ Buffer.prototype.equals = function equals(b) { | |||
| 527 | 527 | ||
| 528 | 528 | ||
| 529 | 529 | // Override how buffers are presented by util.inspect(). | |
| 530 | - Buffer.prototype[internalUtil.inspectSymbol] = function inspect() { | ||
| 530 | + Buffer.prototype[internalUtil.customInspectSymbol] = function inspect() { | ||
| 531 | 531 | var str = ''; | |
| 532 | 532 | var max = exports.INSPECT_MAX_BYTES; | |
| 533 | 533 | if (this.length > 0) { | |
@@ -537,7 +537,7 @@ Buffer.prototype[internalUtil.inspectSymbol] = function inspect() { | |||
| 537 | 537 | } | |
| 538 | 538 | return '<' + this.constructor.name + ' ' + str + '>'; | |
| 539 | 539 | }; | |
| 540 | - Buffer.prototype.inspect = Buffer.prototype[internalUtil.inspectSymbol]; | ||
| 540 | + Buffer.prototype.inspect = Buffer.prototype[internalUtil.customInspectSymbol]; | ||
| 541 | 541 | ||
| 542 | 542 | Buffer.prototype.compare = function compare(target, | |
| 543 | 543 | start, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -34,3 +34,6 @@ assert.doesNotThrow(function() { | |||
| 34 | 34 | assert.strictEqual(util.inspect(b), expected); | |
| 35 | 35 | assert.strictEqual(util.inspect(s), expected); | |
| 36 | 36 | }); | |
| 37 | + | ||
| 38 | + b.inspect = undefined; | ||
| 39 | + assert.strictEqual(util.inspect(b), expected); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments