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