From 295af15427e34d44d1f5f131c0f0c08bdcbd518e Mon Sep 17 00:00:00 2001 From: Randy Stauner Date: Thu, 5 Dec 2024 14:36:39 -0700 Subject: [PATCH] Require rbconfig before use in harness-common so we can disable gems It's used on the second line of this file. If we require it here we can run any harness with `ruby --disable-all`: ruby --disable-all -Iharness-once benchmarks/keyword_args.rb --- harness/harness-common.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/harness/harness-common.rb b/harness/harness-common.rb index 454dbede..33e63151 100644 --- a/harness/harness-common.rb +++ b/harness/harness-common.rb @@ -1,3 +1,5 @@ +require 'rbconfig' + # Ensure the ruby in PATH is the ruby running this, so we can safely shell out to other commands ruby_in_path = `ruby -e 'print RbConfig.ruby'` unless ruby_in_path == RbConfig.ruby