ruby-changes:58572
From: Nobuyoshi <ko1@a...>
Date: Tue, 5 Nov 2019 08:45:39 +0900 (JST)
Subject: [ruby-changes:58572] c7632fa80c (master): Do not occupy `ARGV` by XRUBY command
https://git.ruby-lang.org/ruby.git/commit/?id=c7632fa80c From c7632fa80cd693be27b9bf85f1402b9c8812f325 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Tue, 5 Nov 2019 08:26:10 +0900 Subject: Do not occupy `ARGV` by XRUBY command Instead run test-bundled-gems.rb by `ENV['RUBY']`, which should be set by runruby.rb. diff --git a/common.mk b/common.mk index 4b3a2f9..850e3d9 100644 --- a/common.mk +++ b/common.mk @@ -1295,7 +1295,7 @@ no-test-bundled-gems: https://github.com/ruby/ruby/blob/trunk/common.mk#L1295 # TEST_BUNDLED_GEMS_ALLOW_FAILURES = test-bundled-gems-run: $(PREPARE_BUNDLED_GEMS) - $(Q) $(XRUBY) $(srcdir)/tool/test-bundled-gems.rb $(XRUBY) + $(Q) $(XRUBY) $(srcdir)/tool/test-bundled-gems.rb test-bundler-precheck: $(arch)-fake.rb programs diff --git a/tool/test-bundled-gems.rb b/tool/test-bundled-gems.rb index 02e1812..ded4bc8 100644 --- a/tool/test-bundled-gems.rb +++ b/tool/test-bundled-gems.rb @@ -5,12 +5,13 @@ allowed_failures = allowed_failures.split(',').reject(&:empty?) https://github.com/ruby/ruby/blob/trunk/tool/test-bundled-gems.rb#L5 gem_dir = File.expand_path('../../gems', __FILE__) exit_code = 0 +ruby = ENV['RUBY'] || RbConfig.ruby File.foreach("#{gem_dir}/bundled_gems") do |line| gem = line.split.first puts "\nTesting the #{gem} gem" gem_src_dir = File.expand_path("#{gem_dir}/src/#{gem}", __FILE__) - test_command = "#{ARGV.join(' ')} -C #{gem_src_dir} -Ilib ../../../.bundle/bin/rake" + test_command = "#{ruby} -C #{gem_src_dir} -Ilib ../../../.bundle/bin/rake" puts test_command system test_command -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/