joyent/node — pull request #7281 by mscdex (2014-03-09 20:50:18+00:00)
Title: buffer: allow toString to accept Infinity for end

The reason for this is that when sometimes when debugging, it's necessary to (easily) see the entirety of buffers. So what I've always done up through node v0.10 is set `require('buffer').INSPECT_MAX_BYTES = Infinity;` to accomplish this.

However since some time ago in v0.11, the inspect() implementation changed and now INSPECT_MAX_BYTES is passed directly to toString() which tries to do `Infinity >>> 0` which results in 0. This then causes inspect() to throw because the regexp used doesn't match an empty string.