Skip to content

Commit

Permalink
Load debug.so extensions along with the debug gem itself
Browse files Browse the repository at this point in the history
- This doesn't work still, but now for new reasons.

```
     NoMethodError:
       undefined method `b' for #<Binding:0x0000000107a7e088>

             binding.b
                    ^^
     # ./test/migrator_spec.rb:72:in `block (3 levels) in <top (required)>'
```

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?
  • Loading branch information
issyl0 committed Apr 10, 2024
1 parent b830b3e commit e993765
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Library/Homebrew/standalone/init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
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 = Pathname.new("#{prefix}/gems/#{ruby_version}")
$LOAD_PATH.unshift "#{ruby_path}/gems/debug-1.6.3/lib"
$LOAD_PATH.unshift "#{ruby_path}/extensions/#{Gem::Platform.local}/#{ruby_version}-static/debug-1.6.3"
end

unless $LOAD_PATH.include?(HOMEBREW_LIBRARY_PATH.to_s)
Expand Down

0 comments on commit e993765

Please sign in to comment.