| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b867294 commit e108f20
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -509,7 +509,7 @@ Buffer.prototype.equals = function equals(b) { | |||
| 509 | 509 | ||
| 510 | 510 | ||
| 511 | 511 | // Override how buffers are presented by util.inspect(). | |
| 512 | - Buffer.prototype[internalUtil.inspectSymbol] = function inspect() { | ||
| 512 | + Buffer.prototype[internalUtil.customInspectSymbol] = function inspect() { | ||
| 513 | 513 | var str = ''; | |
| 514 | 514 | var max = exports.INSPECT_MAX_BYTES; | |
| 515 | 515 | if (this.length > 0) { | |
@@ -519,7 +519,7 @@ Buffer.prototype[internalUtil.inspectSymbol] = function inspect() { | |||
| 519 | 519 | } | |
| 520 | 520 | return '<' + this.constructor.name + ' ' + str + '>'; | |
| 521 | 521 | }; | |
| 522 | - Buffer.prototype.inspect = Buffer.prototype[internalUtil.inspectSymbol]; | ||
| 522 | + Buffer.prototype.inspect = Buffer.prototype[internalUtil.customInspectSymbol]; | ||
| 523 | 523 | ||
| 524 | 524 | Buffer.prototype.compare = function compare(target, | |
| 525 | 525 | 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