diff --git a/lib/sys.js b/lib/sys.js index 461a12c8a1..581af38dfe 100644 --- a/lib/sys.js +++ b/lib/sys.js @@ -1,11 +1,15 @@ var events = require('events'); -exports.print = function (x) { - process.stdio.write(x); +exports.print = function () { + for (var i = 0, len = arguments.length; i < len; ++i) { + process.stdio.write(arguments[i]); + } }; -exports.puts = function (x) { - process.stdio.write(x + "\n"); +exports.puts = function () { + for (var i = 0, len = arguments.length; i < len; ++i) { + process.stdio.write(arguments[i] + '\n'); + } }; exports.debug = function (x) { @@ -13,7 +17,9 @@ exports.debug = function (x) { }; exports.error = function (x) { - process.stdio.writeError(x + "\n"); + for (var i = 0, len = arguments.length; i < len; ++i) { + process.stdio.writeError(arguments[i] + '\n'); + } }; /** @@ -116,8 +122,10 @@ exports.inspect = function (obj, showHidden) { return format(obj); }; -exports.p = function (x) { - exports.error(exports.inspect(x)); +exports.p = function () { + for (var i = 0, len = arguments.length; i < len; ++i) { + exports.error(exports.inspect(arguments[i])); + } }; exports.exec = function (command) {