rubygems-update 3.0.3 → 3.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -0
  3. data/CODE_OF_CONDUCT.md +10 -8
  4. data/CONTRIBUTING.md +7 -0
  5. data/History.txt +67 -0
  6. data/README.md +6 -0
  7. data/Rakefile +21 -3
  8. data/bundler/lib/bundler/build_metadata.rb +1 -1
  9. data/lib/rubygems.rb +2 -1
  10. data/lib/rubygems/command_manager.rb +6 -0
  11. data/lib/rubygems/commands/build_command.rb +28 -13
  12. data/lib/rubygems/commands/owner_command.rb +2 -0
  13. data/lib/rubygems/dependency_list.rb +1 -1
  14. data/lib/rubygems/rdoc.rb +2 -2
  15. data/lib/rubygems/request_set/gem_dependency_api.rb +8 -5
  16. data/lib/rubygems/requirement.rb +0 -4
  17. data/lib/rubygems/specification.rb +8 -9
  18. data/lib/rubygems/test_case.rb +14 -8
  19. data/lib/rubygems/uninstaller.rb +1 -1
  20. data/rubygems-update.gemspec +1 -1
  21. data/test/rubygems/ca_cert.pem +74 -65
  22. data/test/rubygems/client.pem +103 -45
  23. data/test/rubygems/ssl_cert.pem +78 -17
  24. data/test/rubygems/ssl_key.pem +25 -13
  25. data/test/rubygems/test_bundled_ca.rb +1 -1
  26. data/test/rubygems/test_gem.rb +5 -8
  27. data/test/rubygems/test_gem_bundler_version_finder.rb +4 -0
  28. data/test/rubygems/test_gem_command_manager.rb +10 -0
  29. data/test/rubygems/test_gem_commands_build_command.rb +1 -0
  30. data/test/rubygems/test_gem_ext_cmake_builder.rb +1 -1
  31. data/test/rubygems/test_gem_indexer.rb +7 -0
  32. data/test/rubygems/test_gem_installer.rb +7 -3
  33. data/test/rubygems/test_gem_rdoc.rb +1 -135
  34. data/test/rubygems/test_gem_request_set_gem_dependency_api.rb +60 -27
  35. data/test/rubygems/test_gem_security_policy.rb +1 -1
  36. data/test/rubygems/test_gem_stream_ui.rb +2 -2
  37. data/test/rubygems/test_gem_uninstaller.rb +21 -2
  38. data/util/ci +6 -1
  39. data/util/create_encrypted_key.rb +4 -4
  40. metadata +3 -51
  41. data/bundler/man/bundle-add.1 +0 -58
  42. data/bundler/man/bundle-binstubs.1 +0 -40
  43. data/bundler/man/bundle-check.1 +0 -31
  44. data/bundler/man/bundle-clean.1 +0 -24
  45. data/bundler/man/bundle-config.1 +0 -497
  46. data/bundler/man/bundle-doctor.1 +0 -44
  47. data/bundler/man/bundle-exec.1 +0 -165
  48. data/bundler/man/bundle-gem.1 +0 -80
  49. data/bundler/man/bundle-info.1 +0 -20
  50. data/bundler/man/bundle-init.1 +0 -25
  51. data/bundler/man/bundle-inject.1 +0 -33
  52. data/bundler/man/bundle-install.1 +0 -308
  53. data/bundler/man/bundle-list.1 +0 -50
  54. data/bundler/man/bundle-lock.1 +0 -84
  55. data/bundler/man/bundle-open.1 +0 -32
  56. data/bundler/man/bundle-outdated.1 +0 -155
  57. data/bundler/man/bundle-package.1 +0 -55
  58. data/bundler/man/bundle-platform.1 +0 -61
  59. data/bundler/man/bundle-pristine.1 +0 -34
  60. data/bundler/man/bundle-remove.1 +0 -31
  61. data/bundler/man/bundle-show.1 +0 -23
  62. data/bundler/man/bundle-update.1 +0 -394
  63. data/bundler/man/bundle-viz.1 +0 -39
  64. data/bundler/man/bundle.1 +0 -136
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0dc749eff33bd5010aed16a0d872d736745731a67b7d021984a00242f9bf6deb
4
- data.tar.gz: b89c85ed093359d9025f910abb564b6274e7d92ba274c8151ada3bb96624fa9e
3
+ metadata.gz: 3dcbed60214cfd0ed97ed7fce1d0c9e9a1298a823a26fcd2b75326d711ff299d
4
+ data.tar.gz: 6dd6fabe834fd5fc81dfa7bb55f874a6d182123a8d0e396fe7dd57cacee5e379
5
5
  SHA512:
6
- metadata.gz: 1d6f81dcf04ffd187eea308dbeb43b0dc9db4d6e64efce6552d8b0ae6f428753b37e2bb9318ae9fe267dc1b1f345cb3d1287c7a15838a4bedaa05a76110c2288
7
- data.tar.gz: ee5462eaeced2ff834ca668420a98ba6d1f639330c476a5ea8f47b5ecebb27eb43a561117cba69ee0ad7cea6080730e33fa26a10fddb331ff8e7b9eaded3e1a0
6
+ metadata.gz: ef072a34d1765edd4f67b83a19efbc691e2f4c4dac6c8fda9004dbb2a771f550aa7b8a61dd301a477310f9e3987c642c8c49e8d417abd1e4bffbe7dd1a485499
7
+ data.tar.gz: e30274bbce496312bcb34f45cce2d7f7c2f6916095f67de538ccb9429b197f402d75c9c3090472dea3d2481760632466c20c513890f3d924e671ff4df77b0982
@@ -3,6 +3,7 @@ AllCops:
3
3
  Exclude:
4
4
  - 'bundler/**/*'
5
5
  - 'lib/rubygems/resolver/molinillo/**/*'
6
+ - 'pkg/**/*'
6
7
  TargetRubyVersion: 2.3
7
8
 
8
9
  Layout/AccessModifierIndentation:
@@ -1,10 +1,10 @@
1
1
  # Contributor Code of Conduct
2
2
 
3
- ### Our Pledge
3
+ ## Our Pledge
4
4
 
5
- In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
5
+ In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
6
 
7
- ### Our Standards
7
+ ## Our Standards
8
8
 
9
9
  Examples of behavior that contributes to creating a positive environment include:
10
10
 
@@ -22,22 +22,24 @@ Examples of unacceptable behavior by participants include:
22
22
  * Publishing others' private information, such as a physical or electronic address, without explicit permission
23
23
  * Other conduct which could reasonably be considered inappropriate in a professional setting
24
24
 
25
- ### Our Responsibilities
25
+ ## Our Responsibilities
26
26
 
27
27
  Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28
28
 
29
29
  Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30
30
 
31
- ### Scope
31
+ ## Scope
32
32
 
33
33
  This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34
34
 
35
- ### Enforcement
35
+ ## Enforcement
36
36
 
37
37
  Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the [project team](MAINTAINERS.txt). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38
38
 
39
39
  Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40
40
 
41
- ### Attribution
41
+ ## Attribution
42
42
 
43
- This Code of Conduct is adapted from the Contributor Covenant, version 1.4, available at http://contributor-covenant.org/version/1/4.
43
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
44
+
45
+ [homepage]: https://www.contributor-covenant.org
@@ -37,6 +37,13 @@ To run commands like `gem install` from the repo:
37
37
 
38
38
  $ ruby -Ilib bin/gem install
39
39
 
40
+ To run bundler test:
41
+
42
+ $ cd bundler
43
+ $ git submodule update --init --recursive
44
+ $ bin/rake spec:deps
45
+ $ bin/rspec spec
46
+
40
47
  ## Issues
41
48
 
42
49
  RubyGems uses labels to track all issues and pull requests. In order to
@@ -1,5 +1,72 @@
1
1
  # coding: UTF-8
2
2
 
3
+ === 3.0.4 / 2019-06-14
4
+
5
+ Minor enhancements:
6
+
7
+ * Add support for TruffleRuby #2612 by Benoit Daloze
8
+ * Serve a more descriptive error when --no-ri or --no-rdoc are used #2572
9
+ by Grey Baker
10
+ * Improve test compatibility with CMake 2.8. Pull request #2590 by Vít
11
+ Ondruch.
12
+ * Restore gem build behavior and introduce the "-C" flag to gem build.
13
+ Pull request #2596 by Luis Sagastume.
14
+ * Enabled block call with util_set_arch. Pull request #2603 by SHIBATA
15
+ Hiroshi.
16
+ * Avoid rdoc hook when it's failed to load rdoc library. Pull request
17
+ #2604 by SHIBATA Hiroshi.
18
+ * Drop tests for legacy RDoc. Pull request #2608 by Nobuyoshi Nakada.
19
+ * Update TODO comment. Pull request #2658 by Luis Sagastume.
20
+ * Skip malicious extension test with mswin platform. Pull request #2670 by
21
+ SHIBATA Hiroshi.
22
+ * Check deprecated methods on release. Pull request #2673 by David
23
+ Rodríguez.
24
+ * Add steps to run bundler tests. Pull request #2680 by Aditya Prakash.
25
+ * Skip temporary "No such host is known" error. Pull request #2684 by
26
+ Takashi Kokubun.
27
+ * Replaced aws-sdk-s3 instead of s3cmd. Pull request #2688 by SHIBATA
28
+ Hiroshi.
29
+ * Allow uninstall from symlinked GEM_HOME. Pull request #2720 by David
30
+ Rodríguez.
31
+ * Use current checkout in CI to uninstall RVM related gems. Pull request
32
+ #2729 by David Rodríguez.
33
+ * Update Contributor Covenant v1.4.1. Pull request #2751 by SHIBATA
34
+ Hiroshi.
35
+ * Added supported versions of Ruby. Pull request #2756 by SHIBATA Hiroshi.
36
+ * Fix shadowing outer local variable warning. Pull request #2763 by Luis
37
+ Sagastume.
38
+ * Update the certificate files to make the test pass on Debian 10. Pull
39
+ request #2777 by Yusuke Endoh.
40
+ * Backport ruby core changes. Pull request #2778 by SHIBATA Hiroshi.
41
+
42
+ Bug fixes:
43
+
44
+ * Test_gem.rb - intermittent failure fix. Pull request #2613 by MSP-Greg.
45
+ * Fix sporadic CI failures. Pull request #2617 by David Rodríguez.
46
+ * Fix flaky bundler version finder tests. Pull request #2624 by David
47
+ Rodríguez.
48
+ * Fix gem indexer tests leaking utility gems. Pull request #2625 by David
49
+ Rodríguez.
50
+ * Clean up default spec dir too. Pull request #2639 by David Rodríguez.
51
+ * Fix 2.6.1 build against vendored bundler. Pull request #2645 by David
52
+ Rodríguez.
53
+ * Fix comment typo. Pull request #2664 by Luis Sagastume.
54
+ * Fix comment of Gem::Specification#required_ruby_version=. Pull request
55
+ #2732 by Alex Junger.
56
+ * Fix TODOs. Pull request #2748 by David Rodríguez.
57
+
58
+ === 3.0.3 / 2019-03-05
59
+
60
+ Security fixes:
61
+
62
+ * Fixed following vulnerabilities:
63
+ * CVE-2019-8320: Delete directory using symlink when decompressing tar
64
+ * CVE-2019-8321: Escape sequence injection vulnerability in `verbose`
65
+ * CVE-2019-8322: Escape sequence injection vulnerability in `gem owner`
66
+ * CVE-2019-8323: Escape sequence injection vulnerability in API response handling
67
+ * CVE-2019-8324: Installing a malicious gem may lead to arbitrary code execution
68
+ * CVE-2019-8325: Escape sequence injection vulnerability in errors
69
+
3
70
  === 3.0.2 / 2019-01-01
4
71
 
5
72
  Minor enhancements:
data/README.md CHANGED
@@ -25,6 +25,12 @@ Finally, inside your Ruby program, load the Nokogiri gem and start parsing your
25
25
 
26
26
  For more information about how to use RubyGems, see our RubyGems basics guide at [guides.rubygems.org](http://guides.rubygems.org/rubygems-basics/)
27
27
 
28
+ ## Requirements
29
+
30
+ * RubyGems 2.6 supports Ruby 2.4 or lower.
31
+ * RubyGems 2.7 supports Ruby 2.5 or lower.
32
+ * RubyGems 3.0 supports Ruby 2.3 or later.
33
+
28
34
  ## Installation
29
35
 
30
36
  RubyGems is likely already installed in your Ruby environment, you can check by running `gem --version` in your terminal emulator.
data/Rakefile CHANGED
@@ -79,12 +79,20 @@ end
79
79
  # --------------------------------------------------------------------
80
80
  # Creating a release
81
81
 
82
- task :prerelease => %w[clobber test bundler:build_metadata]
82
+ task :prerelease => %w[clobber test bundler:build_metadata check_deprecations package]
83
83
  task :postrelease => %w[bundler:build_metadata:clean upload guides:publish blog:publish]
84
84
 
85
+ desc "Check for deprecated methods with expired deprecation horizon"
86
+ task :check_deprecations do
87
+ if v.segments[1] == 0 && v.segments[2] == 0
88
+ sh("util/rubocop -r ./util/cops/deprecations --only Rubygems/Deprecations")
89
+ else
90
+ puts "Skipping deprecation checks since not releasing a major version."
91
+ end
92
+ end
93
+
85
94
  desc "Release rubygems-#{v}"
86
95
  task :release => :prerelease do
87
- Rake::Task["package"].invoke
88
96
  sh "gem push pkg/rubygems-update-#{v}.gem"
89
97
  end
90
98
  Rake::Task["release"].enhance(["postrelease"])
@@ -126,7 +134,17 @@ end
126
134
 
127
135
  desc "Upload release to S3"
128
136
  task :upload_to_s3 do
129
- sh "s3cmd put -P pkg/rubygems-#{v}.zip pkg/rubygems-#{v}.tgz s3://oregon.production.s3.rubygems.org/rubygems/"
137
+ begin
138
+ require "aws-sdk-s3"
139
+ rescue LoadError
140
+ abort "Install the aws-sdk-s3 gem to be able to upload gems to rubygems.org."
141
+ end
142
+
143
+ s3 = Aws::S3::Resource.new(region:'us-west-2')
144
+ %w[zip tgz].each do |ext|
145
+ obj = s3.bucket('oregon.production.s3.rubygems.org').object("rubygems/rubygems-#{v}.#{ext}")
146
+ obj.upload_file("pkg/rubygems-#{v}.#{ext}")
147
+ end
130
148
  end
131
149
 
132
150
  desc "Upload release to rubygems.org"
@@ -4,7 +4,7 @@ module Bundler
4
4
  # Represents metadata from when the Bundler gem was built.
5
5
  module BuildMetadata
6
6
  # begin ivars
7
- @built_at = "2019-03-04".freeze
7
+ @built_at = "2019-06-14".freeze
8
8
  @git_commit_sha = "d7089abb6".freeze
9
9
  @release = false
10
10
  # end ivars
@@ -9,7 +9,7 @@
9
9
  require 'rbconfig'
10
10
 
11
11
  module Gem
12
- VERSION = "3.0.3".freeze
12
+ VERSION = "3.0.4".freeze
13
13
  end
14
14
 
15
15
  # Must be first since it unloads the prelude from 1.9.2
@@ -18,6 +18,7 @@ require 'rubygems/compatibility'
18
18
  require 'rubygems/defaults'
19
19
  require 'rubygems/deprecate'
20
20
  require 'rubygems/errors'
21
+ require 'rubygems/path_support'
21
22
 
22
23
  ##
23
24
  # RubyGems is the Ruby standard for publishing and managing third party
@@ -169,6 +169,12 @@ class Gem::CommandManager
169
169
  when '-v', '--version' then
170
170
  say Gem::VERSION
171
171
  terminate_interaction 0
172
+ when '--no-ri', '--no-rdoc' then
173
+ # This was added to compensate for a deprecation warning not being shown
174
+ # in Rubygems 2.x.x.
175
+ # TODO: Remove when Rubygems 3.1 is released.
176
+ alert_error "Invalid option: #{args.first}. Use --no-document instead."
177
+ terminate_interaction 1
172
178
  when /^-/ then
173
179
  alert_error clean_text("Invalid option: #{args.first}. See 'gem --help'.")
174
180
  terminate_interaction 1
@@ -18,6 +18,10 @@ class Gem::Commands::BuildCommand < Gem::Command
18
18
  add_option '-o', '--output FILE', 'output gem with the given filename' do |value, options|
19
19
  options[:output] = value
20
20
  end
21
+
22
+ add_option '-C PATH', '', 'Run as if gem build was started in <PATH> instead of the current working directory.' do |value, options|
23
+ options[:build_path] = value
24
+ end
21
25
  end
22
26
 
23
27
  def arguments # :nodoc:
@@ -60,25 +64,36 @@ Gems can be saved to a specified filename with the output option:
60
64
  end
61
65
 
62
66
  if File.exist? gemspec
63
- Dir.chdir(File.dirname(gemspec)) do
64
- spec = Gem::Specification.load File.basename(gemspec)
65
-
66
- if spec
67
- Gem::Package.build(
68
- spec,
69
- options[:force],
70
- options[:strict],
71
- options[:output]
72
- )
73
- else
74
- alert_error "Error loading gemspec. Aborting."
75
- terminate_interaction 1
67
+ spec = Gem::Specification.load(gemspec)
68
+
69
+ if options[:build_path]
70
+ Dir.chdir(File.dirname(gemspec)) do
71
+ spec = Gem::Specification.load File.basename(gemspec)
72
+ build_package(spec)
76
73
  end
74
+ else
75
+ build_package(spec)
77
76
  end
77
+
78
78
  else
79
79
  alert_error "Gemspec file not found: #{gemspec}"
80
80
  terminate_interaction 1
81
81
  end
82
82
  end
83
83
 
84
+ private
85
+
86
+ def build_package(spec)
87
+ if spec
88
+ Gem::Package.build(
89
+ spec,
90
+ options[:force],
91
+ options[:strict],
92
+ options[:output]
93
+ )
94
+ else
95
+ alert_error "Error loading gemspec. Aborting."
96
+ terminate_interaction 1
97
+ end
98
+ end
84
99
  end
@@ -63,6 +63,8 @@ permission to.
63
63
  end
64
64
 
65
65
  def show_owners(name)
66
+ Gem.load_yaml
67
+
66
68
  response = rubygems_api_request :get, "api/v1/gems/#{name}/owners.yaml" do |request|
67
69
  request.add_field "Authorization", api_key
68
70
  end
@@ -134,7 +134,7 @@ class Gem::DependencyList
134
134
  end
135
135
 
136
136
  ##
137
- # Is is ok to remove a gemspec from the dependency list?
137
+ # It is ok to remove a gemspec from the dependency list?
138
138
  #
139
139
  # If removing the gemspec creates breaks a currently ok dependency, then it
140
140
  # is NOT ok to remove the gemspec.
@@ -18,7 +18,7 @@ begin
18
18
  module Gem
19
19
  RDoc = ::RDoc::RubygemsHook
20
20
  end
21
+
22
+ Gem.done_installing(&Gem::RDoc.method(:generation_hook))
21
23
  rescue LoadError
22
24
  end
23
-
24
- Gem.done_installing(&Gem::RDoc.method(:generation_hook))
@@ -43,11 +43,12 @@ class Gem::RequestSet::GemDependencyAPI
43
43
  :mri_20 => %w[ruby],
44
44
  :mri_21 => %w[ruby],
45
45
  :rbx => %w[rbx],
46
- :ruby => %w[ruby rbx maglev],
47
- :ruby_18 => %w[ruby rbx maglev],
48
- :ruby_19 => %w[ruby rbx maglev],
49
- :ruby_20 => %w[ruby rbx maglev],
50
- :ruby_21 => %w[ruby rbx maglev],
46
+ :truffleruby => %w[truffleruby],
47
+ :ruby => %w[ruby rbx maglev truffleruby],
48
+ :ruby_18 => %w[ruby rbx maglev truffleruby],
49
+ :ruby_19 => %w[ruby rbx maglev truffleruby],
50
+ :ruby_20 => %w[ruby rbx maglev truffleruby],
51
+ :ruby_21 => %w[ruby rbx maglev truffleruby],
51
52
  }.freeze
52
53
 
53
54
  mswin = Gem::Platform.new 'x86-mswin32'
@@ -85,6 +86,7 @@ class Gem::RequestSet::GemDependencyAPI
85
86
  :ruby_19 => Gem::Platform::RUBY,
86
87
  :ruby_20 => Gem::Platform::RUBY,
87
88
  :ruby_21 => Gem::Platform::RUBY,
89
+ :truffleruby => Gem::Platform::RUBY,
88
90
  :x64_mingw => x64_mingw,
89
91
  :x64_mingw_20 => x64_mingw,
90
92
  :x64_mingw_21 => x64_mingw
@@ -126,6 +128,7 @@ class Gem::RequestSet::GemDependencyAPI
126
128
  :ruby_19 => tilde_gt_1_9_0,
127
129
  :ruby_20 => tilde_gt_2_0_0,
128
130
  :ruby_21 => tilde_gt_2_1_0,
131
+ :truffleruby => gt_eq_0,
129
132
  :x64_mingw => gt_eq_0,
130
133
  :x64_mingw_20 => tilde_gt_2_0_0,
131
134
  :x64_mingw_21 => tilde_gt_2_1_0,
@@ -2,10 +2,6 @@
2
2
  require "rubygems/version"
3
3
  require "rubygems/deprecate"
4
4
 
5
- # If we're being loaded after yaml was already required, then
6
- # load our yaml + workarounds now.
7
- Gem.load_yaml if defined? ::YAML
8
-
9
5
  ##
10
6
  # A Requirement is a set of one or more version restrictions. It supports a
11
7
  # few (<tt>=, !=, >, <, >=, <=, ~></tt>) different restriction operators.
@@ -18,7 +18,7 @@ require 'rubygems/util/list'
18
18
  require 'stringio'
19
19
 
20
20
  ##
21
- # The Specification class contains the information for a Gem. Typically
21
+ # The Specification class contains the information for a gem. Typically
22
22
  # defined in a .gemspec file or a Rakefile, and looks like this:
23
23
  #
24
24
  # Gem::Specification.new do |s|
@@ -364,8 +364,7 @@ class Gem::Specification < Gem::BasicSpecification
364
364
 
365
365
  ##
366
366
  # The metadata holds extra data for this gem that may be useful to other
367
- # consumers and is settable by gem authors without requiring an update to
368
- # the rubygems software.
367
+ # consumers and is settable by gem authors.
369
368
  #
370
369
  # Metadata items have the following restrictions:
371
370
  #
@@ -656,8 +655,8 @@ class Gem::Specification < Gem::BasicSpecification
656
655
  # # This gem will work with 1.8.6 or greater...
657
656
  # spec.required_ruby_version = '>= 1.8.6'
658
657
  #
659
- # # Only with ruby 2.0.x
660
- # spec.required_ruby_version = '~> 2.0'
658
+ # # Only with final releases of major version 2 where minor version is at least 3
659
+ # spec.required_ruby_version = '~> 2.3'
661
660
  #
662
661
  # # Only prereleases or final releases after 2.6.0.preview2
663
662
  # spec.required_ruby_version = '> 2.6.0.preview2'
@@ -745,9 +744,6 @@ class Gem::Specification < Gem::BasicSpecification
745
744
  def self._all # :nodoc:
746
745
  unless defined?(@@all) && @@all
747
746
  @@all = stubs.map(&:to_spec)
748
- if @@all.any?(&:nil?) # TODO: remove once we're happy
749
- raise "pid: #{$$} nil spec! included in #{stubs.inspect}"
750
- end
751
747
 
752
748
  # After a reset, make sure already loaded specs
753
749
  # are still marked as activated.
@@ -940,7 +936,6 @@ class Gem::Specification < Gem::BasicSpecification
940
936
  # -- wilsonb
941
937
 
942
938
  def self.all=(specs)
943
- raise "nil spec!" if specs.any?(&:nil?) # TODO: remove once we're happy
944
939
  @@stubs_by_name = specs.group_by(&:name)
945
940
  @@all = @@stubs = specs
946
941
  end
@@ -1311,6 +1306,8 @@ class Gem::Specification < Gem::BasicSpecification
1311
1306
  # Load custom marshal format, re-initializing defaults as needed
1312
1307
 
1313
1308
  def self._load(str)
1309
+ Gem.load_yaml
1310
+
1314
1311
  array = Marshal.load str
1315
1312
 
1316
1313
  spec = Gem::Specification.new
@@ -2590,6 +2587,8 @@ class Gem::Specification < Gem::BasicSpecification
2590
2587
  end
2591
2588
 
2592
2589
  def to_yaml(opts = {}) # :nodoc:
2590
+ Gem.load_yaml
2591
+
2593
2592
  # Because the user can switch the YAML engine behind our
2594
2593
  # back, we have to check again here to make sure that our
2595
2594
  # psych code was properly loaded, and load it if not.