Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions harness/harness-common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,20 @@ def is_macos

def get_maxrss
unless $LOAD_PATH.resolve_feature_path("fiddle")
gem "fiddle", ">= 1.1.8" # For ruby 3.5.0-dev compatibility
# In Ruby 3.5+, fiddle is no longer a default gem. Load the bundled-gem fiddle instead.
if defined?(Bundler) # benchmarks with Gemfile
bundler_ui_level, Bundler.ui.level = Bundler.ui.level, :error if defined?(Bundler) # suppress warnings from force_activate
Gem::BUNDLED_GEMS.force_activate("fiddle")
Bundler.ui.level = bundler_ui_level if bundler_ui_level
else # benchmarks without Gemfile
gem "fiddle", ">= 1.1.8"
end
end

# Suppress a warning for Ruby 3.4+ on benchmarks with Gemfile
verbose, $VERBOSE = $VERBOSE, nil
require 'fiddle'
$VERBOSE = verbose

require 'rbconfig/sizeof'

unless Fiddle::SIZEOF_LONG == 8 and RbConfig::CONFIG["host_os"] =~ /linux|darwin/
Expand Down