diff options
| author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2022-08-01 09:56:39 +0200 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2022-08-03 06:56:18 +0900 |
| commit | 20936eb3a95f3564e565f59228a35453ae94eee3 (patch) | |
| tree | 77b5764ec94ec8e6597e365219b61c250f38bcf5 /lib/rubygems/specification.rb | |
| parent | eaf6189fe59ac4839d3a04bf7f9552fc22f09471 (diff) | |
[rubygems/rubygems] Warn (rather than crash) when setting `nil` specification versions
https://github.com/rubygems/rubygems/commit/a4ba1a4d97
Diffstat (limited to 'lib/rubygems/specification.rb')
| -rw-r--r-- | lib/rubygems/specification.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index f2e2740026..28ad176b53 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb @@ -2653,6 +2653,8 @@ class Gem::Specification < Gem::BasicSpecification def version=(version) @version = Gem::Version.create(version) + return if @version.nil? + # skip to set required_ruby_version when pre-released rubygems. # It caused to raise CircularDependencyError if @version.prerelease? && (@name.nil? || @name.strip != "rubygems") |
