From 58d03c345841373ee76429c3ef1fd34280cdb0c0 Mon Sep 17 00:00:00 2001 From: David Rodriguez Date: Thu, 4 Apr 2024 12:39:23 +0200 Subject: [PATCH] [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 ' /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 `' /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 `
' ``` (...) ```` https://github.com/rubygems/rubygems/commit/ff7ce7eb6d --- spec/bundler/support/activate.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/bundler/support/activate.rb b/spec/bundler/support/activate.rb index e19a6d0ed1..143b77833d 100644 --- a/spec/bundler/support/activate.rb +++ b/spec/bundler/support/activate.rb @@ -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)