summaryrefslogtreecommitdiff
path: root/lib/rubygems/commands
diff options
context:
space:
mode:
authorHiroshi SHIBATA <[email protected]>2023-03-23 10:16:17 +0900
committerHiroshi SHIBATA <[email protected]>2023-03-23 17:18:49 +0900
commit2e3cd1dc3e30f4725b18032b85a36f208c9528bc (patch)
tree03b319dd2a715c27aa7ca25a892df86aa956416e /lib/rubygems/commands
parent19e9c4004b9d137ad48757f3f4c2d92257e6c2c4 (diff)
[rubygems/rubygems] Enabled Style/RedundantReturn cop
https://github.com/rubygems/rubygems/commit/05cc97bdf8
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/7582
Diffstat (limited to 'lib/rubygems/commands')
-rw-r--r--lib/rubygems/commands/cert_command.rb2
-rw-r--r--lib/rubygems/commands/contents_command.rb2
-rw-r--r--lib/rubygems/commands/environment_command.rb4
-rw-r--r--lib/rubygems/commands/setup_command.rb4
-rw-r--r--lib/rubygems/commands/unpack_command.rb2
-rw-r--r--lib/rubygems/commands/update_command.rb2
6 files changed, 8 insertions, 8 deletions
diff --git a/lib/rubygems/commands/cert_command.rb b/lib/rubygems/commands/cert_command.rb
index e7fcfdca4e..2592723183 100644
--- a/lib/rubygems/commands/cert_command.rb
+++ b/lib/rubygems/commands/cert_command.rb
@@ -179,7 +179,7 @@ class Gem::Commands::CertCommand < Gem::Command
key = Gem::Security.create_key(algorithm)
key_path = Gem::Security.write key, "gem-private_key.pem", 0600, passphrase
- return key, key_path
+ [key, key_path]
end
def certificates_matching(filter)
diff --git a/lib/rubygems/commands/contents_command.rb b/lib/rubygems/commands/contents_command.rb
index 314b50e93e..1b67f74bc2 100644
--- a/lib/rubygems/commands/contents_command.rb
+++ b/lib/rubygems/commands/contents_command.rb
@@ -177,7 +177,7 @@ prefix or only the files that are requireable.
@spec_dirs.sort.each {|dir| say dir }
end
- return nil
+ nil
end
def specification_directories # :nodoc:
diff --git a/lib/rubygems/commands/environment_command.rb b/lib/rubygems/commands/environment_command.rb
index d1b7d07a1d..620da5a023 100644
--- a/lib/rubygems/commands/environment_command.rb
+++ b/lib/rubygems/commands/environment_command.rb
@@ -16,7 +16,7 @@ class Gem::Commands::EnvironmentCommand < Gem::Command
platform display the supported gem platforms
<omitted> display everything
EOF
- return args.gsub(/^\s+/, "")
+ args.gsub(/^\s+/, "")
end
def description # :nodoc:
@@ -170,6 +170,6 @@ lib/rubygems/defaults/operating_system.rb
end
end
- return nil
+ nil
end
end
diff --git a/lib/rubygems/commands/setup_command.rb b/lib/rubygems/commands/setup_command.rb
index efc387a69f..f0d1ccd1ab 100644
--- a/lib/rubygems/commands/setup_command.rb
+++ b/lib/rubygems/commands/setup_command.rb
@@ -356,7 +356,7 @@ By default, this RubyGems will install gem as:
say "Set the GEM_HOME environment variable if you want RDoc generated"
end
- return false
+ false
end
def install_default_bundler_gem(bin_dir)
@@ -432,7 +432,7 @@ By default, this RubyGems will install gem as:
mkdir_p lib_dir, :mode => 0755
mkdir_p bin_dir, :mode => 0755
- return lib_dir, bin_dir
+ [lib_dir, bin_dir]
end
def generate_default_man_dir
diff --git a/lib/rubygems/commands/unpack_command.rb b/lib/rubygems/commands/unpack_command.rb
index cf619fa744..5ec1b49c24 100644
--- a/lib/rubygems/commands/unpack_command.rb
+++ b/lib/rubygems/commands/unpack_command.rb
@@ -129,7 +129,7 @@ command help for an example.
return this_path if File.exist? this_path
end
- return nil
+ nil
end
##
diff --git a/lib/rubygems/commands/update_command.rb b/lib/rubygems/commands/update_command.rb
index facccc5c03..45df205e1d 100644
--- a/lib/rubygems/commands/update_command.rb
+++ b/lib/rubygems/commands/update_command.rb
@@ -232,7 +232,7 @@ command to remove old versions.
highest_remote_tup = highest_remote_name_tuple(rubygems_update)
target = highest_remote_tup ? highest_remote_tup.version : version
- return target, requirement
+ [target, requirement]
end
def update_gem(name, version = Gem::Requirement.default)