Skip to content

Commit

Permalink
Updated runner to be compatible with older versions of node
Browse files Browse the repository at this point in the history
  • Loading branch information
lukebayes committed Feb 21, 2011
1 parent 58f4e66 commit 9fec5b0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/node_should/runner.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ Runner.prototype.run = function(expr, path, printers, completeHandler) {


Runner.prototype._runFileContent = function(file, content, printers, completeHandler) { Runner.prototype._runFileContent = function(file, content, printers, completeHandler) {
var scope = this._createScope(file, printers, completeHandler); var scope = this._createScope(file, printers, completeHandler);
var script = vm.createScript(content, file); vm.runInNewContext(content, scope, file);
script.runInNewContext(scope);
} }


Runner.prototype._createScope = function(file, printers, completeHandler) { Runner.prototype._createScope = function(file, printers, completeHandler) {
Expand Down

0 comments on commit 9fec5b0

Please sign in to comment.