Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redefinition of function in context #9105

Closed
arlolra opened this issue Oct 14, 2016 · 2 comments
Closed

Redefinition of function in context #9105

arlolra opened this issue Oct 14, 2016 · 2 comments
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs. vm Issues and PRs related to the vm subsystem.

Comments

@arlolra
Copy link
Contributor

arlolra commented Oct 14, 2016

Is this expected?

var vm = require("vm");
var ctx = vm.createContext();
ctx.console = console;
vm.runInContext("function red() { console.log('red'); }", ctx);
ctx.red();  // > red
vm.runInContext("function red() { console.log('green'); }", ctx);
ctx.red();  // > red

Pre- node v0.11.7, this used to log > green.

@mscdex mscdex added the vm Issues and PRs related to the vm subsystem. label Oct 14, 2016
@Fishrock123
Copy link
Contributor

Fishrock123 commented Oct 14, 2016

duplicate of #548 -- this a long known but difficult to fix issue

@Fishrock123 Fishrock123 added the duplicate Issues and PRs that are duplicates of other issues or PRs. label Oct 14, 2016
@arlolra
Copy link
Contributor Author

arlolra commented Oct 14, 2016

@Fishrock123 ok, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs. vm Issues and PRs related to the vm subsystem.
Projects
None yet
Development

No branches or pull requests

3 participants