Project

General

Profile

« Previous | Next » 

Revision e7610582

Added by deivid (David Rodríguez) 11 months ago

[rubygems/rubygems] Fix bundle exec gem uninstall

  • 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.

https://github.com/rubygems/rubygems/commit/e3acb7b01d