From f86296fa0aae4eb94666828798f1cf6f8cfaebf7 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 16 Mar 2023 13:41:32 +0900 Subject: [PATCH] [rubygems/rubygems] util/rubocop -A --only Style/EmptyElse https://github.com/rubygems/rubygems/commit/04227104ac --- lib/rubygems/basic_specification.rb | 2 -- lib/rubygems/source.rb | 2 -- lib/rubygems/source/git.rb | 2 -- lib/rubygems/source/installed.rb | 2 -- lib/rubygems/source/local.rb | 2 -- lib/rubygems/source/lock.rb | 2 -- lib/rubygems/source/vendor.rb | 2 -- lib/rubygems/user_interaction.rb | 3 +-- 8 files changed, 1 insertion(+), 16 deletions(-) diff --git a/lib/rubygems/basic_specification.rb b/lib/rubygems/basic_specification.rb index e33c2bc915..82db52dc3b 100644 --- a/lib/rubygems/basic_specification.rb +++ b/lib/rubygems/basic_specification.rb @@ -180,8 +180,6 @@ class Gem::BasicSpecification end end ? fullpath : nil end - else - nil end end diff --git a/lib/rubygems/source.rb b/lib/rubygems/source.rb index 8e4ccc37cb..74ea2c61b3 100644 --- a/lib/rubygems/source.rb +++ b/lib/rubygems/source.rb @@ -56,8 +56,6 @@ class Gem::Source return 1 unless @uri.to_s == other.uri.to_s 0 - else - nil end end diff --git a/lib/rubygems/source/git.rb b/lib/rubygems/source/git.rb index 7ac685f978..70e8d1b06e 100644 --- a/lib/rubygems/source/git.rb +++ b/lib/rubygems/source/git.rb @@ -70,8 +70,6 @@ class Gem::Source::Git < Gem::Source -1 when Gem::Source then 1 - else - nil end end diff --git a/lib/rubygems/source/installed.rb b/lib/rubygems/source/installed.rb index 786faab3e3..afb6674b88 100644 --- a/lib/rubygems/source/installed.rb +++ b/lib/rubygems/source/installed.rb @@ -20,8 +20,6 @@ class Gem::Source::Installed < Gem::Source 0 when Gem::Source then 1 - else - nil end end diff --git a/lib/rubygems/source/local.rb b/lib/rubygems/source/local.rb index 51d6d243a8..0f24bb7e53 100644 --- a/lib/rubygems/source/local.rb +++ b/lib/rubygems/source/local.rb @@ -23,8 +23,6 @@ class Gem::Source::Local < Gem::Source 0 when Gem::Source then 1 - else - nil end end diff --git a/lib/rubygems/source/lock.rb b/lib/rubygems/source/lock.rb index ff71b8cf1d..c37230388e 100644 --- a/lib/rubygems/source/lock.rb +++ b/lib/rubygems/source/lock.rb @@ -24,8 +24,6 @@ class Gem::Source::Lock < Gem::Source @wrapped <=> other.wrapped when Gem::Source then 1 - else - nil end end diff --git a/lib/rubygems/source/vendor.rb b/lib/rubygems/source/vendor.rb index 543acf1388..f25ac13eef 100644 --- a/lib/rubygems/source/vendor.rb +++ b/lib/rubygems/source/vendor.rb @@ -18,8 +18,6 @@ class Gem::Source::Vendor < Gem::Source::Installed 0 when Gem::Source then 1 - else - nil end end end diff --git a/lib/rubygems/user_interaction.rb b/lib/rubygems/user_interaction.rb index 502ccc4357..116e8bbd5a 100644 --- a/lib/rubygems/user_interaction.rb +++ b/lib/rubygems/user_interaction.rb @@ -270,8 +270,7 @@ class Gem::StreamUI when /^y/i then true when /^n/i then false when /^$/ then default - else nil - end + end end return result