bundle exec assigns Gem::Specification.all to the set of specs
known to Bundler (a Bundler::SpecSet).
gem uninstall recently started calling #delete on the set of specs
stored in Gem::Specification#all. This, in RubyGems, is just an
array of specs, so has a #delete method that receives a single
element.
However, at some point I added a SpecSet#delete method that takes an
array of specs, breaking the "Array-like" contract and making gem uninstall break when run in a bundle exec context.
The fix is to make Bundler::SpecSet#delete handle being given a single
spec.
[rubygems/rubygems] Fix
bundle exec gem uninstall
bundle exec
assignsGem::Specification.all
to the set of specsknown to Bundler (a
Bundler::SpecSet
).gem uninstall
recently started calling#delete
on the set of specsstored in
Gem::Specification#all
. This, in RubyGems, is just anarray of specs, so has a
#delete
method that receives a singleelement.
However, at some point I added a
SpecSet#delete
method that takes anarray of specs, breaking the "Array-like" contract and making
gem uninstall
break when run in abundle exec
context.The fix is to make
Bundler::SpecSet#delete
handle being given a singlespec.
https://github.com/rubygems/rubygems/commit/e3acb7b01d