fixed rubyracer v8 binding to work with current version

This commit is contained in:
Nick Gauthier 2010-06-07 10:36:28 -04:00
parent d2a14be3e4
commit 501aeb61ac
1 changed files with 1 additions and 1 deletions

View File

@ -180,7 +180,7 @@ module Hydra #:nodoc:
def run_javascript_file(file) def run_javascript_file(file)
errors = [] errors = []
require 'v8' require 'v8'
V8::Context.open do |context| V8::Context.new do |context|
context.load(File.expand_path(File.join(File.dirname(__FILE__), 'js', 'lint.js'))) context.load(File.expand_path(File.join(File.dirname(__FILE__), 'js', 'lint.js')))
context['input'] = lambda{ context['input'] = lambda{
File.read(file) File.read(file)