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