From 40ce9bfd4917f8d8aa023c92073ec5e9da898f71 Mon Sep 17 00:00:00 2001
From: Eric Hodel <drbrain@segment7.net>
Date: Tue, 23 Jul 2013 13:47:53 -0700
Subject: [PATCH] Fix test failure when ruby is not yet installed
Other uses of ruby in a Makefile use ENV['RUBY'] which contains a
miniruby invocation when ruby is not yet installed (tests run during the
ruby build).
---
test/rubygems/test_gem_ext_ext_conf_builder.rb | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/test/rubygems/test_gem_ext_ext_conf_builder.rb b/test/rubygems/test_gem_ext_ext_conf_builder.rb
index 33398ac..dfbf3fe 100644
--- a/test/rubygems/test_gem_ext_ext_conf_builder.rb
+++ b/test/rubygems/test_gem_ext_ext_conf_builder.rb
@@ -120,8 +120,13 @@ def test_class_build_unconventional
extconf.puts <<-'EXTCONF'
include RbConfig
-ruby_exe = "#{CONFIG['RUBY_INSTALL_NAME']}#{CONFIG['EXEEXT']}"
-ruby = File.join CONFIG['bindir'], ruby_exe
+ruby =
+ if ENV['RUBY'] then
+ ENV['RUBY']
+ else
+ ruby_exe = "#{CONFIG['RUBY_INSTALL_NAME']}#{CONFIG['EXEEXT']}"
+ File.join CONFIG['bindir'], ruby_exe
+ end
open 'Makefile', 'w' do |io|
io.write <<-Makefile
--
1.8.5.5