[rubygems/rubygems] Update required_ruby_version to 3.1

3.0 has been EOL since march, drop support for it before the 3.4 release is cut

Signed-off-by: Samuel Giddins <segiddins@segiddins.me>

https://github.com/rubygems/rubygems/commit/fc1f03b06a
This commit is contained in:
Samuel Giddins 2024-10-01 18:20:19 -07:00 коммит произвёл git
Родитель 30038656aa
Коммит bdc3363d0f
5 изменённых файлов: 7 добавлений и 15 удалений

Просмотреть файл

@ -29,10 +29,10 @@ Gem::Specification.new do |s|
"source_code_uri" => "https://github.com/rubygems/rubygems/tree/master/bundler",
}
s.required_ruby_version = ">= 3.0.0"
s.required_ruby_version = ">= 3.1.0"
# It should match the RubyGems version shipped with `required_ruby_version` above
s.required_rubygems_version = ">= 3.2.3"
s.required_rubygems_version = ">= 3.3.3"
s.files = Dir.glob("lib/bundler{.rb,/**/*}", File::FNM_DOTMATCH).reject {|f| File.directory?(f) }

Просмотреть файл

@ -446,7 +446,7 @@ module Bundler
end
def required_ruby_version
"3.0.0"
"3.1.0"
end
def rubocop_version

Просмотреть файл

@ -266,11 +266,7 @@ module Bundler
groups.map!(&:to_sym)
deps = current_dependencies # always returns a new array
deps.select! do |d|
if RUBY_VERSION >= "3.1"
d.groups.intersect?(groups)
else
!(d.groups & groups).empty?
end
d.groups.intersect?(groups)
end
deps
end

Просмотреть файл

@ -10,7 +10,7 @@ module Bundler
method = instance_method(method_name)
undef_method(method_name)
define_method(method_name) do |*args, &blk|
method.bind(self).call(*args, &blk)
method.bind_call(self, *args, &blk)
rescue NetworkDownError, CompactIndexClient::Updater::MismatchedChecksumError => e
raise HTTPError, e.message
rescue AuthenticationRequiredError, BadAuthenticationError

Просмотреть файл

@ -13,11 +13,7 @@ module Kernel
module_function define_method(:warn) {|*messages, **kw|
unless uplevel = kw[:uplevel]
if Gem.java_platform? && RUBY_VERSION < "3.1"
return original_warn.bind(self).call(*messages)
else
return original_warn.bind(self).call(*messages, **kw)
end
return original_warn.bind_call(self, *messages, **kw)
end
# Ensure `uplevel` fits a `long`
@ -44,6 +40,6 @@ module Kernel
kw[:uplevel] = start
end
original_warn.bind(self).call(*messages, **kw)
original_warn.bind_call(self, *messages, **kw)
}
end