When installing in parallel, bundler creates several `Gem::Installer`
instances that run in parallel. These installers access the `@@all` class
variable of `Gem::Specification` concurrently.
If a concurrent thread calls `Gem::Specification.reset` (resetting
`@all` to `nil`) while another thread is running
`Gem::Specification._all` or another method that expects `@@all` to be
loaded and not `nil`, that can result in `Enumerable` methods being
called on `nil`, resulting in crashes.
I fix it by protecting the other concurrent access to the `@all`
variable.
https://github.com/rubygems/rubygems/commit/58b343c530
I don't know why it was living at the class level. At first I thought it
would be to reuse some server instances between tests, but they seem to
be cleaned up after every test anyways, so I don't think any of it is
needed.
https://github.com/rubygems/rubygems/commit/04bee71216
- Resolver asked Molinillo to resolve-then-activate, which led to using Gem::NameTuple before any require had been passed
Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
https://github.com/rubygems/rubygems/commit/e11782b0c8
Our tests are now guaranteed to not work on older versions of minitest,
so I don't think we should swallow this activation error because it will
make it very clear for the user what the problem is if she has a
minitest version not satisfying the requirement.
https://github.com/rubygems/rubygems/commit/a291b65369
This patch allows global variables that have been assigned in Ruby to
move. I added a new function for the GC to call that will update
global references and introduced a new callback in the global variable
struct for updating references.
Only pure Ruby global variables are supported right now, other
references will be pinned.
Right now `SomeClass.method` is properly named, but `SomeModule.method`
is displayed as `#<Module:0x000055eb5d95adc8>.method` which makes
profiling annoying.
No objects should ever reference a `T_MOVED` slot. If they do, it's
absolutely a bug. If we kill the process when `T_MOVED` is pushed on
the mark stack it will make it easier to identify which object holds a
reference that hasn't been updated.
It caches a path to .irbrc file, which has caused random failure:
```
1) Failure:
TestIRB::ExtendCommand#test_irb_info_multiline [/home/mame/work/ruby/test/irb/test_cmd.rb:49]:
Expected /
Ruby\sversion: .+\n
IRB\sversion:\sirb .+\n
InputMethod:\sReidlineInputMethod\swith\sReline .+ and .+\n
\.irbrc\spath: .+
/x to match "Ruby version: 2.8.0\n" +
"IRB version: irb 1.2.3 (2020-02-15)\n" +
"InputMethod: ReidlineInputMethod with Reline 0.1.4 and /tmp/test_reline_config_155659/.inputrc\n".
```