Skip to content

Commit

Permalink
fixes #1390: persistence of non-enumerable global properties in the REPL
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelficarra committed May 25, 2011
1 parent bbf1c6a commit 454aa84
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
6 changes: 4 additions & 2 deletions lib/coffee-script.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions lib/repl.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/coffee-script.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ exports.eval = (code, options = {}) ->
sandbox =
require: require
module : { exports: {} }
sandbox[g] = global[g] for g of global
sandbox[g] = global[g] for g in Object.getOwnPropertyNames global
sandbox.global = sandbox
sandbox.global.global = sandbox.global.root = sandbox.global.GLOBAL = sandbox
sandbox.__filename = options.filename || 'eval'
Expand Down
2 changes: 1 addition & 1 deletion src/repl.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ run = do ->
sandbox =
require: require
module : { exports: {} }
sandbox[g] = global[g] for g of global
sandbox[g] = global[g] for g in Object.getOwnPropertyNames global
sandbox.global = sandbox
sandbox.global.global = sandbox.global.root = sandbox.global.GLOBAL = sandbox
(buffer) ->
Expand Down

0 comments on commit 454aa84

Please sign in to comment.