From c3ea073a07cdf14b40102c72bf65419af83bb6ef Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Fri, 26 Mar 2021 20:36:26 +0000 Subject: [PATCH] utils/gems: add dependencies to LOAD_PATH. --- Library/Homebrew/utils/gems.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/utils/gems.rb b/Library/Homebrew/utils/gems.rb index a8ef197b22..bc2337834c 100644 --- a/Library/Homebrew/utils/gems.rb +++ b/Library/Homebrew/utils/gems.rb @@ -88,7 +88,10 @@ module Homebrew specs = Gem.install name, version, document: [] end - # Add the new specs to the $LOAD_PATH. + specs += specs.flat_map(&:runtime_dependencies) + .flat_map(&:to_specs) + + # Add the specs to the $LOAD_PATH. specs.each do |spec| spec.require_paths.each do |path| full_path = File.join(spec.full_gem_path, path)