Closes GH-232 Make the repl's global the right thing
authorisaacs <i@izs.me>
Wed, 16 Feb 2011 23:40:53 +0000 (15:40 -0800)
committerRyan Dahl <ry@tinyclouds.org>
Mon, 28 Feb 2011 01:13:52 +0000 (17:13 -0800)
lib/repl.js

index 4c769e7..7e42ac9 100644 (file)
@@ -45,6 +45,8 @@ function resetContext() {
   for (var i in global) context[i] = global[i];
   context.module = module;
   context.require = require;
+  context.global = context;
+  context.global.global = context;
   for (var i in require.cache) delete require.cache[i];
 }