sys.puts should not kill the process when giving it undefined
authorFriedemann Altrock <frodenius@gmail.com>
Sat, 28 Nov 2009 11:15:37 +0000 (12:15 +0100)
committerRyan Dahl <ry@tinyclouds.org>
Sat, 28 Nov 2009 19:56:47 +0000 (20:56 +0100)
lib/sys.js

index dbdd21b..da749db 100644 (file)
@@ -3,15 +3,15 @@ exports.print = function (x) {
 };
 
 exports.puts = function (x) {
-  process.stdio.write(x.toString() + "\n");
+  process.stdio.write(x + "\n");
 };
 
 exports.debug = function (x) {
-  process.stdio.writeError("DEBUG: " + x.toString() + "\n");
+  process.stdio.writeError("DEBUG: " + x + "\n");
 };
 
 exports.error = function (x) {
-  process.stdio.writeError(x.toString() + "\n");
+  process.stdio.writeError(x + "\n");
 };
 
 /**