[rubygems/rubygems] Fix crash with development bundler binstub

Fixes the following error:

````
$ ruby /home/deivid/code/rubygems/rubygems/bundler/spec/support/bundle.rb clean --force
--- ERROR REPORT TEMPLATE -------------------------------------------------------

```
TypeError: no implicit conversion of Pathname into String
  /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/runtime.rb:167:in `match'
          /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/runtime.rb:167:in `block in clean'
          /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/runtime.rb:164:in `each'
          /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/runtime.rb:164:in `clean'
          /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/cli/clean.rb:13:in `run'
          /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/cli.rb:590:in `clean'
          /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run'
          /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
          /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/vendor/thor/lib/thor.rb:527:in `dispatch'
          /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/cli.rb:34:in `dispatch'
          /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start'
          /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/cli.rb:28:in `start'
          /home/deivid/code/rubygems/rubygems/bundler/exe/bundle:28:in `block in <top (required)>'
          /home/deivid/code/rubygems/rubygems/bundler/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
          /home/deivid/code/rubygems/rubygems/bundler/exe/bundle:20:in `<top (required)>'
          /home/deivid/code/rubygems/rubygems/bundler/spec/support/bundle.rb:5:in `load'
          /home/deivid/code/rubygems/rubygems/bundler/spec/support/bundle.rb:5:in `<main>'

```
(...)
````

https://github.com/rubygems/rubygems/commit/ff7ce7eb6d
This commit is contained in:
David Rodriguez 2024-04-04 12:39:23 +02:00 committed by Hiroshi SHIBATA
parent 4e48d2724e
commit 58d03c3458

View File

@ -5,5 +5,5 @@ Gem.instance_variable_set(:@ruby, ENV["RUBY"]) if ENV["RUBY"]
require_relative "path"
bundler_gemspec = Spec::Path.loaded_gemspec
bundler_gemspec.instance_variable_set(:@full_gem_path, Spec::Path.source_root)
bundler_gemspec.instance_variable_set(:@full_gem_path, Spec::Path.source_root.to_s)
bundler_gemspec.activate if bundler_gemspec.respond_to?(:activate)