From e65e6039a8310e2b110ea5b22be90e73a2eae84d Mon Sep 17 00:00:00 2001 From: isaacs Date: Fri, 11 Jun 2010 13:59:18 -0700 Subject: [PATCH] Fix #169. Expose require members in the repl. This fixes #169 by putting the require members onto the cwdRequire function which is exposed to the repl scope. --- lib/repl.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/repl.js b/lib/repl.js index 9c27e4e9118..d0fefde8541 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -24,6 +24,9 @@ function cwdRequire (id) { } return require(id); } +Object.keys(require).forEach(function (k) { + cwdRequire[k] = require[k]; +}); function setScope (self) { scope = {};