You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
nalp@muse:~/mtrude$ node -v; node -e '(new Buffer(10).x())'
v0.5.10
undefined:1
*
^
TypeError: Object ��R���R4 has no method 'x'
at Object.<anonymous> (eval at <anonymous> (eval:1:75))
at Object.<anonymous> (eval:1:63)
at Module._compile (module.js:432:26)
at startup (node.js:84:14)
at node.js:534:3
Expected behavior:
undefined:1
*
^
TypeError: Buffer has no method 'x'
at Object.<anonymous> (eval at <anonymous> (eval:1:75))
at Object.<anonymous> (eval:1:63)
at Module._compile (module.js:432:26)
at startup (node.js:84:14)
at node.js:534:3
Note! It is even worse for new Buffer(1000) or even new Buffer(1024 * 1024)... Also
There's not much Node can do about that. The TypeError is generated by V8 and it calls .toString() on the object when it generates the error message. Point in case (snipped for brevity):
> {toString: function() { return "BAM" }}.g()
TypeError: Object BAM has no method 'g'
at repl:1:42
> function F(){} F.prototype.toString = function() { return "BAM" }; (new F).g();
TypeError: Object BAM has no method 'g'
at repl:1:76
Expected behavior:
Note! It is even worse for
new Buffer(1000)
or evennew Buffer(1024 * 1024)
... Alsopaints the rest of the stack trace green.
The text was updated successfully, but these errors were encountered: