summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2024-11-27 16:17:13 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2024-11-27 16:45:10 +0900
commitac7b63e3534d123198e868ece160675f29da5a57 (patch)
tree40dbd78aeaa09e7ab3960eb85bb92fb8828947c6
parent26aebdb6d6ada732bf0aadd9062e65291c7cc413 (diff)
Fixed test condition for specified bundled gems
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12179
-rw-r--r--spec/bundled_gems.mspec2
-rw-r--r--tool/test-bundled-gems.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/spec/bundled_gems.mspec b/spec/bundled_gems.mspec
index f17f32f1b2..48f917c809 100644
--- a/spec/bundled_gems.mspec
+++ b/spec/bundled_gems.mspec
@@ -2,7 +2,7 @@ load File.dirname(__FILE__) + '/default.mspec'
class MSpecScript
test_bundled_gems = get(:stdlibs).to_a & get(:bundled_gems).to_a
- unless ENV["BUNDLED_GEMS"].nil?
+ unless ENV["BUNDLED_GEMS"].nil? || ENV["BUNDLED_GEMS"].empty?
test_bundled_gems = ENV["BUNDLED_GEMS"].split(",").map do |gem|
test_bundled_gems.find{|test_gem| test_gem.include?(gem) }
end.compact
diff --git a/tool/test-bundled-gems.rb b/tool/test-bundled-gems.rb
index 9aad4c3b63..8ea365112c 100644
--- a/tool/test-bundled-gems.rb
+++ b/tool/test-bundled-gems.rb
@@ -24,7 +24,7 @@ failed = []
File.foreach("#{gem_dir}/bundled_gems") do |line|
next if /^\s*(?:#|$)/ =~ line
gem = line.split.first
- next unless bundled_gems.delete_prefix("BUNDLED_GEMS=").split(",").include?(gem)
+ next unless bundled_gems.empty? || bundled_gems.split(",").include?(gem)
next unless File.directory?("#{gem_dir}/src/#{gem}/test")
test_command = "#{ruby} -C #{gem_dir}/src/#{gem} #{rake} test"