More Rubocop

This commit is contained in:
Maruno17
2021-12-27 00:26:45 +00:00
parent 4a6324389b
commit aa643a6049
51 changed files with 346 additions and 323 deletions

View File

@@ -413,12 +413,12 @@ module PluginManager
# -1 if v1 is lower than v2
#-----------------------------------------------------------------------------
def self.compare_versions(v1, v2)
d1 = v1.split("")
d1 = v1.chars
d1.insert(0, "0") if d1[0] == "." # Turn ".123" into "0.123"
while d1[-1] == "." # Turn "123." into "123"
d1 = d1[0..-2]
end
d2 = v2.split("")
d2 = v2.chars
d2.insert(0, "0") if d2[0] == "." # Turn ".123" into "0.123"
while d2[-1] == "." # Turn "123." into "123"
d2 = d2[0..-2]