If not string, console.log should just print it without trying to format
authorRyan Dahl <ry@tinyclouds.org>
Tue, 29 Jun 2010 04:12:33 +0000 (21:12 -0700)
committerRyan Dahl <ry@tinyclouds.org>
Tue, 29 Jun 2010 04:20:21 +0000 (21:20 -0700)
src/node.js

index 9edc514..fbcd41a 100644 (file)
@@ -194,6 +194,7 @@ process.openStdin = function () {
 function format (f) {
   var i = 1;
   var args = arguments;
+  if (!(f instanceof String)) return f;
   return f.replace(/%([sdf])/g, function (x) {
     switch (x) {
       case '%s': return args[i++];