VersionElement: attempt most likely match first
This commit is contained in:
parent
42da1295ce
commit
b7c0c53ffc
@ -4,9 +4,9 @@ class VersionElement
|
||||
def initialize elem
|
||||
elem = elem.to_s.downcase
|
||||
@elem = case elem
|
||||
when /\d+/ then elem.to_i
|
||||
when 'a', 'alpha' then 'alpha'
|
||||
when 'b', 'beta' then 'beta'
|
||||
when /\d+/ then elem.to_i
|
||||
else elem
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user