Skip to content

Commit 5470479

Browse files
committed
Fix selection of the right ruby for testing in sync script
1 parent bc72ade commit 5470479

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎tool/sync/sync-rubyspec.rb‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,20 +190,20 @@ def test_new_specs
190190
Dir.chdir(SOURCE_REPO) do
191191
workflow = YAML.load_file(".github/workflows/ci.yml")
192192
job_name = MSPEC ? "test" : "specs"
193-
versions = workflow.dig("jobs", job_name, "strategy", "matrix", "ruby")
193+
versions = workflow.dig("jobs", job_name, "strategy", "matrix", "ruby").map(&:to_s)
194194
versions = versions.grep(/^\d+\./) # Test on MRI
195195
min_version, max_version = versions.minmax
196196

197197
test_command = MSPEC ? "bundle install && bundle exec rspec" : "../mspec/bin/mspec -j"
198198

199199
run_test = -> version {
200-
command = "chruby #{version} && #{test_command}"
200+
command = "chruby ruby-#{version} && #{test_command}"
201201
sh ENV["SHELL"], "-c", command
202202
}
203203

204204
run_test[min_version]
205205
run_test[max_version]
206-
run_test["ruby-master"] if TEST_MASTER
206+
run_test["master"] if TEST_MASTER
207207
end
208208
end
209209

0 commit comments

Comments
 (0)