From 8e338c613641c4e0a3f4130e4b3bdf018c712d23 Mon Sep 17 00:00:00 2001 From: Matt Ranney Date: Thu, 10 Nov 2011 12:52:37 -1000 Subject: [PATCH] node 0.6 fixes --- generate_commands.js | 1 - lib/util.js | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/generate_commands.js b/generate_commands.js index e94d74ec4a..e6949d3a14 100644 --- a/generate_commands.js +++ b/generate_commands.js @@ -1,5 +1,4 @@ var http = require("http"), - sys = require("sys"), fs = require("fs"); function prettyCurrentTime() { diff --git a/lib/util.js b/lib/util.js index 3dc41a5777..632631cca2 100644 --- a/lib/util.js +++ b/lib/util.js @@ -1,6 +1,7 @@ -if (process.versions.node.match(/^0.3/)) { +// Support for very old versions of node. At some point, we should abandon this. +var minor = process.versions.node.split('.')[1]; +if (minor > 2) { exports.util = require("util"); } else { - // This module is called "sys" in 0.2.x exports.util = require("sys"); }