Created
February 16, 2011 23:42
-
-
Save isaacs/830569 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From c5b0e760fcaeae1968c9f637b0ec89d15698634d Mon Sep 17 00:00:00 2001 | |
From: isaacs <i@izs.me> | |
Date: Wed, 16 Feb 2011 15:40:53 -0800 | |
Subject: [PATCH] Closes GH-232 Make the repl's global the right thing | |
--- | |
lib/repl.js | 2 ++ | |
1 files changed, 2 insertions(+), 0 deletions(-) | |
diff --git a/lib/repl.js b/lib/repl.js | |
index 8ae6028..66eb96d 100644 | |
--- a/lib/repl.js | |
+++ b/lib/repl.js | |
@@ -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]; | |
} | |
-- | |
1.7.2.3 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment