mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
More Rubocop
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user