diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2022-07-29 14:59:56 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2022-07-29 15:46:15 +0900 |
commit | bfd09b1116bcc747bab922b23c7322e4ec66c2c2 (patch) | |
tree | 38c52d7a1f5790f8902eb585267e5da5f9e76399 /lib/bundler/rubygems_ext.rb | |
parent | f29f1d22c3d62b72b8943eefb384cd7a52251ea1 (diff) |
Merge rubygems master from https://github.com/rubygems/rubygems/commit/446cc57a7ccdf1924deb291be9571219e7ba8523
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6198
Diffstat (limited to 'lib/bundler/rubygems_ext.rb')
-rw-r--r-- | lib/bundler/rubygems_ext.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/bundler/rubygems_ext.rb b/lib/bundler/rubygems_ext.rb index a47692d1f2..e8e03fcf8f 100644 --- a/lib/bundler/rubygems_ext.rb +++ b/lib/bundler/rubygems_ext.rb @@ -17,6 +17,15 @@ require "rubygems/source" require_relative "match_platform" +# Cherry-pick fixes to `Gem.ruby_version` to be useful for modern Bundler +# versions and ignore patchlevels +# (https://github.com/rubygems/rubygems/pull/5472, +# https://github.com/rubygems/rubygems/pull/5486). May be removed once RubyGems +# 3.3.12 support is dropped. +unless Gem.ruby_version.to_s == RUBY_VERSION || RUBY_PATCHLEVEL == -1 + Gem.instance_variable_set(:@ruby_version, Gem::Version.new(RUBY_VERSION)) +end + module Gem class Specification include ::Bundler::MatchPlatform |