summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2023-02-01 18:24:21 +0900
committergit <svn-admin@ruby-lang.org>2023-02-01 16:44:55 +0000
commit375f527ded72cd20374144dd605e0177945b9fae (patch)
tree93aa81f55580b2a82de57e41b03e9c25fa3a8541 /lib
parentaa222b56faa31397ad19fa06b5cfb4cdd52b3148 (diff)
[rubygems/rubygems] Introduce to specify deprecated version for rubygems_deprecate_command.
We sometimes to remove minor command without bumping major version. This feature helps this deprecation process. https://github.com/rubygems/rubygems/commit/41301cd2a8
Diffstat (limited to 'lib')
-rw-r--r--lib/rubygems/deprecate.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rubygems/deprecate.rb b/lib/rubygems/deprecate.rb
index 5fe0afb6b0..56505512c3 100644
--- a/lib/rubygems/deprecate.rb
+++ b/lib/rubygems/deprecate.rb
@@ -143,7 +143,7 @@ module Gem::Deprecate
end
# Deprecation method to deprecate Rubygems commands
- def rubygems_deprecate_command
+ def rubygems_deprecate_command(version = Gem::Deprecate.next_rubygems_major_version)
class_eval do
define_method "deprecated?" do
true
@@ -151,7 +151,7 @@ module Gem::Deprecate
define_method "deprecation_warning" do
msg = [ "#{self.command} command is deprecated",
- ". It will be removed in Rubygems #{Gem::Deprecate.next_rubygems_major_version}.\n",
+ ". It will be removed in Rubygems #{version}.\n",
]
alert_warning "#{msg.join}" unless Gem::Deprecate.skip