If a default version and a regular version of etc are present at the
same time, RubyGems will end up duplicating work and running pristine
twice.
The `etc` gem is special because it's loaded by RubyGems by default.
When doing this, RubyGems will activate the regularly installed version.
The when `gem pristine` runs, it will find to installed specifications
but materialize both to the already activated specification.
Before:
```
$ gem pristine etc --version 1.4.3
Restoring gems to pristine condition...
Building native extensions. This could take a while...
Restored etc-1.4.3
Building native extensions. This could take a while...
Restored etc-1.4.3
```
After:
```
$ gem pristine etc --version 1.4.3
Restoring gems to pristine condition...
Skipped etc-1.4.3, it is a default gem
Building native extensions. This could take a while...
Restored etc-1.4.3
```
https://github.com/rubygems/rubygems/commit/5c279ac56b
This helps with memory usage during application boot time
```
==> memprof.after.txt <==
Total allocated: 1.43 MB (18852 objects)
Total retained: 421.12 kB (4352 objects)
==> memprof.before.txt <==
Total allocated: 2.43 MB (28355 objects)
Total retained: 469.69 kB (5425 objects)
```
See https://bugs.ruby-lang.org/issues/19890 about the readline
allocations
https://github.com/rubygems/rubygems/commit/d7eb66eee3
On JRuby, sometimes we get the following error in CI when running a
realworld test that checks that `gem install rails` succeeds:
```
ERROR: While executing gem ... (NoMethodError)
undefined method `ignored=' for nil:NilClass
/home/runner/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/stub_specification.rb:193:in `to_spec'
org/jruby/RubyArray.java:2642:in `map'
/home/runner/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/specification.rb:758:in `_all'
/home/runner/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/specification.rb:956:in `each'
org/jruby/RubyEnumerable.java:1710:in `any?'
/home/runner/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/resolver/activation_request.rb:111:in `installed?'
/home/runner/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/request_set.rb:173:in `block in install'
```
I'm not sure how this error is happening, but I think there's no need to
copy the `@ignored` instance variable when materializing stub
specifications. This instance variable is used to not print a warning
about missing extensions more than once for each gem upon gem
activation, but as far as I can see, it's only used by methods that work
on specification stubs. Once specifications are materialized, I think
it can be safely ignored.
https://github.com/rubygems/rubygems/commit/301cecd5a7
* Fix gem pristine not accounting for user installed gems. Pull request
#2914 by Luis Sagastume.
* Refactor keyword argument test for Ruby 2.7. Pull request #2947 by
SHIBATA Hiroshi.
* Fix errors at frozen Gem::Version. Pull request #2949 by Nobuyoshi
Nakada.
* Remove taint usage on Ruby 2.7+. Pull request #2951 by Jeremy Evans.
* Check Manifest.txt is up to date. Pull request #2953 by David Rodríguez.
* Clarify symlink conditionals in tests. Pull request #2962 by David
Rodríguez.
* Update command line parsing to work under ps. Pull request #2966 by
David Rodríguez.
* Properly test `Gem::Specifications.stub_for`. Pull request #2970 by
David Rodríguez.
* Fix Gem::LOADED_SPECS_MUTEX handling for recursive locking. Pull request
#2985 by MSP-Greg.
This version contains the some style changes by RuboCop.
* 9d810be0ed
* 61ea98a727
* 795893dce3
* 9be7858f7f
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* It drop to support < Ruby 2.2
* Cleanup deprecated methods and classes.
* Mark obsoleted methods to deprecate.
* and other enhancements.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
It supports to enable frozen string literal and add `--norc` option for
disable to `.gemrc` configuration.
See 2.5.2 release notes for other fixes and enhancements.
a8aa3bac72/History.txt (L3)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
When you change this to true, you may need to add more tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
this version includes #1396, #1397, #1398, #1399
* test/rubygems: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
this version includes #1367 , #1373 , #1375
* test/rubygems: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
should not change the value of $. when `require`ing gems.
this fixed test failures introduced by r51813.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
this version contains many enhancements see http://git.io/vtNwF
* test/rubygems: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Fixed extension directory in Gem::Specification#require_paths.
Allow installation of gems when $HOME is nonexistent or unwritable.
Use proper API in InstallCommand.
Improve support for path option in gem dependency files.
Remove warnings.
* test/rubygems: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e