diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-03-22 13:26:37 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-03-23 17:18:49 +0900 |
commit | 0eef33e113e61f0d6efcf47f93602bd9d68f68d2 (patch) | |
tree | 1305402633da67630cf1ebfebbb6a630420108be /lib/rubygems/source/local.rb | |
parent | bec069b0cae3934bb2caee3aad7fbf587ab95937 (diff) | |
download | ruby-0eef33e113e61f0d6efcf47f93602bd9d68f68d2.tar.gz |
[rubygems/rubygems] util/rubocop -A --only Style/Next
https://github.com/rubygems/rubygems/commit/e5868e92f7
Diffstat (limited to 'lib/rubygems/source/local.rb')
-rw-r--r-- | lib/rubygems/source/local.rb | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/rubygems/source/local.rb b/lib/rubygems/source/local.rb index 0007b39bee..4f910a771c 100644 --- a/lib/rubygems/source/local.rb +++ b/lib/rubygems/source/local.rb @@ -79,15 +79,14 @@ class Gem::Source::Local < Gem::Source found = [] @specs.each do |n, data| - if n.name == gem_name - s = data[1].spec - - if version.satisfied_by?(s.version) - if prerelease - found << s - elsif !s.version.prerelease? || version.prerelease? - found << s - end + next unless n.name == gem_name + s = data[1].spec + + if version.satisfied_by?(s.version) + if prerelease + found << s + elsif !s.version.prerelease? || version.prerelease? + found << s end end end |