Skip to content
This repository has been archived by the owner on Mar 15, 2021. It is now read-only.

Commit

Permalink
Adapt to newer nodejs versions (runInThisContext)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidaurelio committed Dec 28, 2011
1 parent 4a6e1fc commit b88b238
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/adapters/node.js
Expand Up @@ -26,7 +26,10 @@ foounit.generateSuite = require('./node/cli').generateSuite;
var adapter = (function (){
var sys = require('sys')
, fs = require('fs')
, runInThisContext = process.binding('evals').Script.runInThisContext;
, runInThisContext = (
process.binding('evals').Script || // older node versions
require('vm') // newer node versions
).runInThisContext;

// Private variables
var self = {}, _specdir;
Expand Down

0 comments on commit b88b238

Please sign in to comment.