[rubygems/rubygems] RUBY_REVISION is also provided by supported platforms

https://github.com/rubygems/rubygems/commit/71a237aeec
This commit is contained in:
Hiroshi SHIBATA 2023-03-16 15:09:24 +09:00 committed by git
parent ea1dcb3e23
commit 3dc4bc313f
3 changed files with 8 additions and 8 deletions

View File

@ -282,7 +282,7 @@ class Gem::Request
ua << " Ruby/#{ruby_version} (#{RUBY_RELEASE_DATE}"
if RUBY_PATCHLEVEL >= 0
ua << " patchlevel #{RUBY_PATCHLEVEL}"
elsif defined?(RUBY_REVISION)
else
ua << " revision #{RUBY_REVISION}"
end
ua << ")"

View File

@ -1096,7 +1096,7 @@ Also, a list:
@RUBY_VERSION = RUBY_VERSION
@RUBY_PATCHLEVEL = RUBY_PATCHLEVEL
@RUBY_REVISION = RUBY_REVISION if defined?(RUBY_REVISION)
@RUBY_REVISION = RUBY_REVISION
@RUBY_DESCRIPTION = RUBY_DESCRIPTION
@RUBY_ENGINE = RUBY_ENGINE
@RUBY_ENGINE_VERSION = RUBY_ENGINE_VERSION if defined?(RUBY_ENGINE_VERSION)
@ -1116,7 +1116,7 @@ Also, a list:
Object.const_set :RUBY_VERSION, @RUBY_VERSION
Object.const_set :RUBY_PATCHLEVEL, @RUBY_PATCHLEVEL
Object.const_set :RUBY_REVISION, @RUBY_REVISION if defined?(@RUBY_REVISION)
Object.const_set :RUBY_REVISION, @RUBY_REVISION
Object.const_set :RUBY_DESCRIPTION, @RUBY_DESCRIPTION
Object.const_set :RUBY_ENGINE, @RUBY_ENGINE
Object.const_set :RUBY_ENGINE_VERSION, @RUBY_ENGINE_VERSION if defined?(@RUBY_ENGINE_VERSION)
@ -1125,7 +1125,7 @@ Also, a list:
def util_clear_RUBY_VERSION
Object.send :remove_const, :RUBY_VERSION
Object.send :remove_const, :RUBY_PATCHLEVEL
Object.send :remove_const, :RUBY_REVISION if defined?(RUBY_REVISION)
Object.send :remove_const, :RUBY_REVISION
Object.send :remove_const, :RUBY_DESCRIPTION
Object.send :remove_const, :RUBY_ENGINE
Object.send :remove_const, :RUBY_ENGINE_VERSION if defined?(RUBY_ENGINE_VERSION)

View File

@ -327,7 +327,7 @@ class TestGemRequest < Gem::TestCase
Object.send :remove_const, :RUBY_PATCHLEVEL
Object.send :const_set, :RUBY_PATCHLEVEL, -1
Object.send :remove_const, :RUBY_REVISION if defined?(RUBY_REVISION)
Object.send :remove_const, :RUBY_REVISION
Object.send :const_set, :RUBY_REVISION, 6
ua = make_request(@uri, nil, nil, nil).user_agent
@ -343,7 +343,7 @@ class TestGemRequest < Gem::TestCase
Object.send :remove_const, :RUBY_PATCHLEVEL
Object.send :const_set, :RUBY_PATCHLEVEL, -1
Object.send :remove_const, :RUBY_REVISION if defined?(RUBY_REVISION)
Object.send :remove_const, :RUBY_REVISION
ua = make_request(@uri, nil, nil, nil).user_agent
@ -498,7 +498,7 @@ ERROR: Certificate is an invalid CA certificate
Object.send :remove_const, :RUBY_PATCHLEVEL
Object.send :const_set, :RUBY_PATCHLEVEL, @orig_RUBY_PATCHLEVEL
Object.send :remove_const, :RUBY_REVISION if defined?(RUBY_REVISION)
Object.send :remove_const, :RUBY_REVISION
Object.send :const_set, :RUBY_REVISION, @orig_RUBY_REVISION if
defined?(@orig_RUBY_REVISION)
end
@ -506,7 +506,7 @@ ERROR: Certificate is an invalid CA certificate
def util_save_version
@orig_RUBY_ENGINE = RUBY_ENGINE
@orig_RUBY_PATCHLEVEL = RUBY_PATCHLEVEL
@orig_RUBY_REVISION = RUBY_REVISION if defined? RUBY_REVISION
@orig_RUBY_REVISION = RUBY_REVISION
end
def util_stub_net_http(hash)