From 6b430a95c9a8c965f32d641dced169e6cecd61d6 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Tue, 29 Jun 2010 09:53:12 -0700 Subject: [PATCH] console.log: if not string, coerce into one --- src/node.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node.js b/src/node.js index fbcd41a6d3..97b1f1b9df 100644 --- a/src/node.js +++ b/src/node.js @@ -194,7 +194,7 @@ process.openStdin = function () { function format (f) { var i = 1; var args = arguments; - if (!(f instanceof String)) return f; + if (!(f instanceof String)) f = String(f); return f.replace(/%([sdf])/g, function (x) { switch (x) { case '%s': return args[i++];