From ce0ac4076c1fc7caa4e66788bba0fe718291ea2c Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Fri, 27 May 2011 15:32:30 -0500 Subject: [PATCH] update libv8 dependency, fall back to libv8 if necessary. --- ext/v8/extconf.rb | 7 ++++++- lib/v8/cli.rb | 3 ++- therubyracer.gemspec | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ext/v8/extconf.rb b/ext/v8/extconf.rb index d247c4a..b936723 100755 --- a/ext/v8/extconf.rb +++ b/ext/v8/extconf.rb @@ -1,6 +1,11 @@ require 'mkmf' require 'set' -require 'libv8' +begin + require 'libv8' +rescue LoadError + require 'rubygems' + require 'libv8' +end puts "Compiling The Ruby Racer..." diff --git a/lib/v8/cli.rb b/lib/v8/cli.rb index 4e1dd41..af69280 100644 --- a/lib/v8/cli.rb +++ b/lib/v8/cli.rb @@ -25,8 +25,9 @@ module V8 exit(1) end if options.version_info + require 'libv8' puts "The Ruby Racer #{V8::VERSION}" - puts "V8 Version 2.3.3" + puts "V8 Version #{Libv8::V8_VERSION}" exit elsif options.selftest self.test diff --git a/therubyracer.gemspec b/therubyracer.gemspec index 98d68e6..593b215 100644 --- a/therubyracer.gemspec +++ b/therubyracer.gemspec @@ -21,7 +21,7 @@ Gem::Specification.new do |s| s.extensions = ["ext/v8/extconf.rb"] s.require_paths = ["lib", "ext"] - s.add_dependency "libv8", "~> 3.3.8.2" + s.add_dependency "libv8", "~> 3.3.10" s.add_development_dependency "rake", "~> 0.8.7" s.add_development_dependency "rspec", ">= 2.0.0"