From 71a3bfa7db437eb257b333f792cf599909ae9446 Mon Sep 17 00:00:00 2001 From: Charlie Somerville Date: Mon, 9 Sep 2013 00:38:33 +1000 Subject: [PATCH] avoid installing binding_of_caller if it's already installed --- ext/mkrf_conf.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ext/mkrf_conf.rb b/ext/mkrf_conf.rb index fa3f2575..50adfca2 100644 --- a/ext/mkrf_conf.rb +++ b/ext/mkrf_conf.rb @@ -1,7 +1,9 @@ -require 'rubygems/dependency_installer' +require 'rubygems/dependency_installer' gem = Gem::DependencyInstaller.new if ["rbx", "ruby"].include?(RUBY_ENGINE) - gem.install "binding_of_caller", "0.7.2" + if Gem::Dependency.new("binding_of_caller", "0.7.2").matching_specs.empty? + gem.install "binding_of_caller", "0.7.2" + end end