summaryrefslogtreecommitdiff
path: root/lib/rubygems/deprecate.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2023-03-16 13:12:38 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2023-03-17 18:50:55 +0900
commit1ca67f13cd2ebb643fc924246cc790f14b26480d (patch)
tree0551499a620d3d3d034681b107aedda4019b710e /lib/rubygems/deprecate.rb
parent5211900d37573a82c1bdf7cb2354937cc4022ae1 (diff)
downloadruby-1ca67f13cd2ebb643fc924246cc790f14b26480d.tar.gz
util/rubocop -A --only Style/RedundantSelf
Diffstat (limited to 'lib/rubygems/deprecate.rb')
-rw-r--r--lib/rubygems/deprecate.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/rubygems/deprecate.rb b/lib/rubygems/deprecate.rb
index c51d75a48d..535fe8d336 100644
--- a/lib/rubygems/deprecate.rb
+++ b/lib/rubygems/deprecate.rb
@@ -103,7 +103,7 @@ module Gem::Deprecate
old = "_deprecated_#{name}"
alias_method old, name
define_method name do |*args, &block|
- klass = self.is_a? Module
+ klass = is_a? Module
target = klass ? "#{self}." : "#{self.class}#"
msg = [
"NOTE: #{target}#{name} is deprecated",
@@ -129,7 +129,7 @@ module Gem::Deprecate
old = "_deprecated_#{name}"
alias_method old, name
define_method name do |*args, &block|
- klass = self.is_a? Module
+ klass = is_a? Module
target = klass ? "#{self}." : "#{self.class}#"
msg = [
"NOTE: #{target}#{name} is deprecated",
@@ -153,7 +153,7 @@ module Gem::Deprecate
define_method "deprecation_warning" do
msg = [
- "#{self.command} command is deprecated",
+ "#{command} command is deprecated",
". It will be removed in Rubygems #{version}.\n",
]