Skip to content

Commit

Permalink
Require rbconfig before use in harness-common so we can disable gems
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rwstauner committed Dec 5, 2024
1 parent 1dbbdce commit ca20a9c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions harness/harness-common.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit ca20a9c

Please sign in to comment.