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