lib/benchmark_driver/rbenv.rb in benchmark_driver-0.13.3 vs lib/benchmark_driver/rbenv.rb in benchmark_driver-0.14.0

- old
+ new

@@ -1,5 +1,7 @@ +require 'shellwords' + module BenchmarkDriver module Rbenv # @param [String] version def self.ruby_path(version) path = `RBENV_VERSION='#{version}' rbenv which ruby`.rstrip @@ -11,10 +13,10 @@ # @param [String] full_spec - "2.5.0", "2.5.0,--jit", "JIT::2.5.0,--jit", etc. def self.parse_spec(full_spec) name, spec = full_spec.split('::', 2) spec ||= name # if `::` is not given, regard whole string as spec - version, *args = spec.split(',') + version, *args = spec.shellsplit BenchmarkDriver::Config::Executable.new( name: name, command: [BenchmarkDriver::Rbenv.ruby_path(version), *args], ) end