[rubygems/rubygems] Remove backport of LATEST_RUBY_WITHOUT_PATCH_VERSIONS

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

https://github.com/rubygems/rubygems/commit/24c8073b24
This commit is contained in:
Samuel Giddins 2025-05-17 10:58:37 -04:00 committed by Hiroshi SHIBATA
parent d8d0da5713
commit 485ee6d7a3
No known key found for this signature in database
GPG Key ID: F9CF13417264FAC2

View File

@ -136,23 +136,6 @@ module Gem
full_gem_path
end
unless const_defined?(:LATEST_RUBY_WITHOUT_PATCH_VERSIONS)
LATEST_RUBY_WITHOUT_PATCH_VERSIONS = Gem::Version.new("2.1")
alias_method :rg_required_ruby_version=, :required_ruby_version=
def required_ruby_version=(req)
self.rg_required_ruby_version = req
@required_ruby_version.requirements.map! do |op, v|
if v >= LATEST_RUBY_WITHOUT_PATCH_VERSIONS && v.release.segments.size == 4
[op == "~>" ? "=" : op, Gem::Version.new(v.segments.tap {|s| s.delete_at(3) }.join("."))]
else
[op, v]
end
end
end
end
def insecurely_materialized?
false
end