Permalink
Browse files

Use new "vm" module to eval scripts if it's available.

  • Loading branch information...
1 parent 1820d67 commit 922f9a55a50aa954ca4744abfac58843f8ea88cf @polotek polotek committed Jun 27, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/adapters/node.js
View
@@ -26,7 +26,7 @@ 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 || require('vm').Script).runInThisContext;
// Private variables
var self = {}, _specdir;

0 comments on commit 922f9a5

Please sign in to comment.