mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 21:14:23 +02:00
util/rubocop -A --only Layout/SpaceInsideArrayLiteralBrackets
This commit is contained in:
parent
3e1f767cd5
commit
0373615948
6 changed files with 49 additions and 46 deletions
|
@ -105,7 +105,8 @@ module Gem::Deprecate
|
||||||
define_method name do |*args, &block|
|
define_method name do |*args, &block|
|
||||||
klass = self.is_a? Module
|
klass = self.is_a? Module
|
||||||
target = klass ? "#{self}." : "#{self.class}#"
|
target = klass ? "#{self}." : "#{self.class}#"
|
||||||
msg = [ "NOTE: #{target}#{name} is deprecated",
|
msg = [
|
||||||
|
"NOTE: #{target}#{name} is deprecated",
|
||||||
repl == :none ? " with no replacement" : "; use #{repl} instead",
|
repl == :none ? " with no replacement" : "; use #{repl} instead",
|
||||||
". It will be removed on or after %4d-%02d." % [year, month],
|
". It will be removed on or after %4d-%02d." % [year, month],
|
||||||
"\n#{target}#{name} called from #{Gem.location_of_caller.join(":")}",
|
"\n#{target}#{name} called from #{Gem.location_of_caller.join(":")}",
|
||||||
|
@ -130,7 +131,8 @@ module Gem::Deprecate
|
||||||
define_method name do |*args, &block|
|
define_method name do |*args, &block|
|
||||||
klass = self.is_a? Module
|
klass = self.is_a? Module
|
||||||
target = klass ? "#{self}." : "#{self.class}#"
|
target = klass ? "#{self}." : "#{self.class}#"
|
||||||
msg = [ "NOTE: #{target}#{name} is deprecated",
|
msg = [
|
||||||
|
"NOTE: #{target}#{name} is deprecated",
|
||||||
replacement == :none ? " with no replacement" : "; use #{replacement} instead",
|
replacement == :none ? " with no replacement" : "; use #{replacement} instead",
|
||||||
". It will be removed in Rubygems #{Gem::Deprecate.next_rubygems_major_version}",
|
". It will be removed in Rubygems #{Gem::Deprecate.next_rubygems_major_version}",
|
||||||
"\n#{target}#{name} called from #{Gem.location_of_caller.join(":")}",
|
"\n#{target}#{name} called from #{Gem.location_of_caller.join(":")}",
|
||||||
|
@ -150,7 +152,8 @@ module Gem::Deprecate
|
||||||
end
|
end
|
||||||
|
|
||||||
define_method "deprecation_warning" do
|
define_method "deprecation_warning" do
|
||||||
msg = [ "#{self.command} command is deprecated",
|
msg = [
|
||||||
|
"#{self.command} command is deprecated",
|
||||||
". It will be removed in Rubygems #{version}.\n",
|
". It will be removed in Rubygems #{version}.\n",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue