Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use ruby provided by ruby's tests

When running tests in ruby's repository, ruby may not be installed.  The
tests now prefer the ruby built by the ruby repository over an installed
ruby.
  • Loading branch information...
commit 968682759b3b65e42748cd2befb2ff3e982272d9 1 parent 1e590aa
Eric Hodel drbrain authored
2  lib/rake/file_utils.rb
View
@@ -6,7 +6,7 @@
# added to the FileUtils utility functions.
module FileUtils
# Path to the currently running Ruby program
- RUBY = File.join(
+ RUBY = ENV['RUBY'] || File.join(
RbConfig::CONFIG['bindir'],
RbConfig::CONFIG['ruby_install_name'] + RbConfig::CONFIG['EXEEXT']).
sub(/.*\s.*/m, '"\&"')
8 test/helper.rb
View
@@ -12,8 +12,8 @@
require File.expand_path('../file_creation', __FILE__)
begin
- require 'test/ruby/envutil'
-rescue LoadError
+ require_relative '../ruby/envutil'
+rescue NoMethodError, LoadError
# for ruby trunk
end
@@ -515,8 +515,8 @@ def rakefile_test_signal
end
task :test do
- Rake::Task[:a].invoke rescue nil
- Rake::Task[:b].invoke rescue nil
+ Rake::Task[:a].invoke
+ Rake::Task[:b].invoke
end
task :default => :test
2  test/test_rake_functional.rb
View
@@ -480,7 +480,7 @@ def rake(*rake_options)
def run_ruby(option_list)
puts "COMMAND: [#{RUBY} #{option_list.join ' '}]" if @verbose
- inn, out, err, wait = Open3.popen3(Gem.ruby, *option_list)
+ inn, out, err, wait = Open3.popen3(RUBY, *option_list)
inn.close
@exit = wait ? wait.value : $?
Please sign in to comment.
Something went wrong with that request. Please try again.