Set ruby-prof to v1.4.3

This is the last version of this gem that supports
Ruby 2.6.x. We can stop passing the explicit version
when we move to a newer version of Ruby.
This commit is contained in:
apainintheneck 2022-12-29 12:48:13 -08:00
parent 1a21c7e7ef
commit 3a35ea3e28

View File

@ -37,7 +37,9 @@ module Homebrew
output_filename = "prof/d3-flamegraph.html"
safe_system "stackprof --d3-flamegraph prof/stackprof.dump > #{output_filename}"
else
Homebrew.install_gem_setup_path! "ruby-prof"
# NOTE: ruby-prof v1.4.3 is the last version that supports Ruby 2.6.x
# TODO: Remove explicit version arg when we move to a newer version of Ruby
Homebrew.install_gem_setup_path! "ruby-prof", version: "1.4.3"
output_filename = "prof/call_stack.html"
safe_system "ruby-prof", "--printer=call_stack", "--file=#{output_filename}", brew_rb, "--", *args.named
end