Blame SOURCES/rubygems-2.1.0-Fix-test-failure-when-ruby-is-not-yet-installed.patch

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