Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the first token of --chruby as the default name #244

Merged
merged 1 commit into from
Aug 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion run_benchmarks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,10 @@ def run_benchmarks(ruby:, ruby_description:, categories:, name_filters:, out_pat
opts.on("--chruby=NAME::VERSION OPTIONS", "ruby version under chruby and options to be benchmarked") do |v|
v.split(";").each do |name_version|
name, version = name_version.split("::", 2)
# Convert `ruby --yjit` to `ruby::ruby --yjit`
if version.nil?
version = name # allow skipping `NAME::`
version = name
name = name.shellsplit.first
end
version, *options = version.shellsplit
unless executable = ["/opt/rubies/#{version}/bin/ruby", "#{ENV["HOME"]}/.rubies/#{version}/bin/ruby"].find { |path| File.executable?(path) }
Expand Down