lib/benchmark_driver/config.rb in benchmark_driver-0.10.10 vs lib/benchmark_driver/config.rb in benchmark_driver-0.10.11
- old
+ new
@@ -40,9 +40,14 @@
# @return [String] - Return result of `ruby -v`. This is for convenience of output plugins.
def description
@cache[:description] ||= IO.popen([*command, '-v'], &:read).rstrip
end
+
+ # @return [String] - Return RUBY_VERSION
+ def version
+ @cache[:version] ||= IO.popen([*command, '-e', 'print RUBY_VERSION'], &:read)
+ end
end
Config.defaults[:executables] = [
BenchmarkDriver::Config::Executable.new(name: RUBY_VERSION, command: [RbConfig.ruby]),
]
end