Skip to content

Commit

Permalink
Always use Gem::Installer mutex
Browse files Browse the repository at this point in the history
If Gem::Installer is subclassed (as in Bundler) then @install_lock will
not be initialized and Bundler will not be able to install gems.

Using an explicit class allows subclassing to work transparently.

See
d96e0d5#commitcomment-7729421
  • Loading branch information
drbrain committed Sep 10, 2014
1 parent 6fd4ebf commit 92cd464
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rubygems/installer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def install

say spec.post_install_message unless spec.post_install_message.nil?

self.class.install_lock.synchronize { Gem::Specification.add_spec spec }
Gem::Installer.install_lock.synchronize { Gem::Specification.add_spec spec }

run_post_install_hooks

Expand Down

0 comments on commit 92cd464

Please sign in to comment.