From 3a35ea3e28f5dfd312f2166d36eb458b36f21a39 Mon Sep 17 00:00:00 2001 From: apainintheneck Date: Thu, 29 Dec 2022 12:48:13 -0800 Subject: [PATCH] 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. --- Library/Homebrew/dev-cmd/prof.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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