diff --git a/Library/Homebrew/dev-cmd/prof.rb b/Library/Homebrew/dev-cmd/prof.rb index dfc7f1ae18..4a1f5e5ae0 100644 --- a/Library/Homebrew/dev-cmd/prof.rb +++ b/Library/Homebrew/dev-cmd/prof.rb @@ -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