From 169dfa72d998252c27a76e106c75b211f96f5146 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Wed, 10 Apr 2024 23:43:55 +0100 Subject: [PATCH] Load `debug.so` extensions along with the debug gem itself - This doesn't work still, but now for new reasons. ``` NoMethodError: undefined method `b' for # binding.b ^^ # ./test/migrator_spec.rb:72:in `block (3 levels) in ' ``` and if I add `require "debug"` to the spec_helper again it gives: ``` LoadError: cannot load such file -- debug ``` but, doing a `require "debug"; binding.b` in `migrator_spec` _does_ work. Where is the require coming from where it works some of the time but not through all of the layers we have? --- Library/Homebrew/standalone/init.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/standalone/init.rb b/Library/Homebrew/standalone/init.rb index 9f9c7831fb968..7e3d2f04f996a 100644 --- a/Library/Homebrew/standalone/init.rb +++ b/Library/Homebrew/standalone/init.rb @@ -40,9 +40,11 @@ end if Pathname.new(RbConfig.ruby).to_s.include?("/vendor/portable-ruby/") - prefix = RbConfig::CONFIG["rubylibprefix"] ruby_version = RbConfig::CONFIG["ruby_version"] - $LOAD_PATH.unshift "#{prefix}/gems/#{ruby_version}/gems/debug-1.6.3/lib" + ruby_path = "#{RbConfig::CONFIG["rubylibprefix"]}/gems/#{ruby_version}" + + $LOAD_PATH.unshift "#{ruby_path}/extensions/#{Gem::Platform.local}/#{ruby_version}-static/debug-1.6.3" + $LOAD_PATH.unshift "#{ruby_path}/gems/debug-1.6.3/lib" end unless $LOAD_PATH.include?(HOMEBREW_LIBRARY_PATH.to_s)