diff options
Diffstat (limited to 'lib/rake/extensiontask.rb')
-rw-r--r-- | lib/rake/extensiontask.rb | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/rake/extensiontask.rb b/lib/rake/extensiontask.rb index 7c69741..0f48520 100644 --- a/lib/rake/extensiontask.rb +++ b/lib/rake/extensiontask.rb @@ -393,8 +393,11 @@ Java extension should be preferred. return end - require "yaml" - config_file = YAML.load_file(config_path) + rbconfig_file = Rake::CompilerConfig.new(config_path).find(ruby_ver, for_platform) + unless rbconfig_file + warn "no configuration section for specified version of Ruby (rbconfig-#{for_platform}-#{ruby_ver})" + return + end # tmp_path tmp_path = "#{@tmp_dir}/#{for_platform}/#{@name}/#{ruby_ver}" @@ -405,11 +408,6 @@ Java extension should be preferred. # lib_binary_path lib_binary_path = "#{lib_path}/#{File.basename(binary(for_platform))}" - unless rbconfig_file = config_file["rbconfig-#{for_platform}-#{ruby_ver}"] then - warn "no configuration section for specified version of Ruby (rbconfig-#{for_platform}-#{ruby_ver})" - return - end - # mkmf mkmf_file = File.expand_path(File.join(File.dirname(rbconfig_file), '..', 'mkmf.rb')) |