Skip to content

Commit

Permalink
Merge pull request #244 from k0kubun/chruby-name
Browse files Browse the repository at this point in the history
Use the first token of --chruby as the default name
  • Loading branch information
maximecb authored Aug 2, 2023
2 parents 4cc2446 + 3efa468 commit ae160f0
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 ae160f0

Please sign in to comment.