mirror of
https://github.com/ruby/ruby.git
synced 2025-08-27 15:06:10 +02:00
[rubygems/rubygems] Add question marks to interrogative methods
52da85e9ef
This commit is contained in:
parent
0a9544ce4a
commit
c67f6c4daf
Notes:
git
2022-12-20 04:15:34 +00:00
1 changed files with 5 additions and 5 deletions
|
@ -100,11 +100,11 @@ module Bundler
|
||||||
|
|
||||||
if major?
|
if major?
|
||||||
a <=> b
|
a <=> b
|
||||||
elsif either_version_older_than_locked(a, b, locked_version)
|
elsif either_version_older_than_locked?(a, b, locked_version)
|
||||||
a <=> b
|
a <=> b
|
||||||
elsif segments_do_not_match(a, b, :major)
|
elsif segments_do_not_match?(a, b, :major)
|
||||||
b <=> a
|
b <=> a
|
||||||
elsif !minor? && segments_do_not_match(a, b, :minor)
|
elsif !minor? && segments_do_not_match?(a, b, :minor)
|
||||||
b <=> a
|
b <=> a
|
||||||
else
|
else
|
||||||
a <=> b
|
a <=> b
|
||||||
|
@ -113,11 +113,11 @@ module Bundler
|
||||||
post_sort(result, package.unlock?, locked_version)
|
post_sort(result, package.unlock?, locked_version)
|
||||||
end
|
end
|
||||||
|
|
||||||
def either_version_older_than_locked(a, b, locked_version)
|
def either_version_older_than_locked?(a, b, locked_version)
|
||||||
locked_version && (a.version < locked_version || b.version < locked_version)
|
locked_version && (a.version < locked_version || b.version < locked_version)
|
||||||
end
|
end
|
||||||
|
|
||||||
def segments_do_not_match(a, b, level)
|
def segments_do_not_match?(a, b, level)
|
||||||
index = [:major, :minor].index(level)
|
index = [:major, :minor].index(level)
|
||||||
a.segments[index] != b.segments[index]
|
a.segments[index] != b.segments[index]
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue