Skip to content

Commit

Permalink
Use the first token of --chruby as the default name
Browse files Browse the repository at this point in the history
  • Loading branch information
k0kubun committed Aug 1, 2023
1 parent 4cc2446 commit 3efa468
Showing 1 changed file with 3 additions and 1 deletion.
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

0 comments on commit 3efa468

Please sign in to comment.