summaryrefslogtreecommitdiff
path: root/lib/rubygems
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2021-11-11 10:41:39 +0900
committernagachika <nagachika@ruby-lang.org>2021-11-22 10:51:35 +0900
commit24f911f474e11560af5fbd0f637f4c0ded23f604 (patch)
tree2f4d2fbdf6bc195012cbced0dac7d1463934cc67 /lib/rubygems
parent31a71048521224774bdb8b5982ab73eb35dad66d (diff)
Merge RubyGems 3.2.28 and Bundler 2.2.28
Diffstat (limited to 'lib/rubygems')
-rw-r--r--lib/rubygems/platform.rb1
-rw-r--r--lib/rubygems/resolver/set.rb1
-rw-r--r--lib/rubygems/specification_policy.rb2
-rw-r--r--lib/rubygems/uri.rb9
4 files changed, 11 insertions, 2 deletions
diff --git a/lib/rubygems/platform.rb b/lib/rubygems/platform.rb
index 9750df181b..efb046c7aa 100644
--- a/lib/rubygems/platform.rb
+++ b/lib/rubygems/platform.rb
@@ -100,6 +100,7 @@ class Gem::Platform
when /^dotnet([\d.]*)/ then [ 'dotnet', $1 ]
when /linux-?((?!gnu)\w+)?/ then [ 'linux', $1 ]
when /mingw32/ then [ 'mingw32', nil ]
+ when /mingw-?(\w+)?/ then [ 'mingw', $1 ]
when /(mswin\d+)(\_(\d+))?/ then
os, version = $1, $3
@cpu = 'x86' if @cpu.nil? and os =~ /32$/
diff --git a/lib/rubygems/resolver/set.rb b/lib/rubygems/resolver/set.rb
index 8046e18ea1..5d8dd51eaa 100644
--- a/lib/rubygems/resolver/set.rb
+++ b/lib/rubygems/resolver/set.rb
@@ -20,7 +20,6 @@ class Gem::Resolver::Set
attr_accessor :prerelease
def initialize # :nodoc:
- require 'uri'
@prerelease = false
@remote = true
@errors = []
diff --git a/lib/rubygems/specification_policy.rb b/lib/rubygems/specification_policy.rb
index 1f1f73b11f..c30ec707d9 100644
--- a/lib/rubygems/specification_policy.rb
+++ b/lib/rubygems/specification_policy.rb
@@ -381,7 +381,7 @@ http://spdx.org/licenses or '#{Gem::Licenses::NONSTANDARD}' for a nonstandard li
end
LAZY = '"FIxxxXME" or "TOxxxDO"'.gsub(/xxx/, '')
- LAZY_PATTERN = /FI XME|TO DO/x.freeze
+ LAZY_PATTERN = /^FI XME|^TO DO/x.freeze
HOMEPAGE_URI_PATTERN = /\A[a-z][a-z\d+.-]*:/i.freeze
def validate_lazy_metadata
diff --git a/lib/rubygems/uri.rb b/lib/rubygems/uri.rb
index 031d7e01c3..ba30fac2f5 100644
--- a/lib/rubygems/uri.rb
+++ b/lib/rubygems/uri.rb
@@ -43,6 +43,11 @@ class Gem::Uri
@parsed_uri.respond_to?(method_name, include_private) || super
end
+ protected
+
+ # Add a protected reader for the cloned instance to access the original object's parsed uri
+ attr_reader :parsed_uri
+
private
##
@@ -99,4 +104,8 @@ class Gem::Uri
def token?
!user.nil? && password.nil?
end
+
+ def initialize_copy(original)
+ @parsed_uri = original.parsed_uri.clone
+ end
end