os/mac: fix for major versions other than 10

This commit is contained in:
Bo Anderson 2020-06-23 16:51:16 +01:00
parent 2d54b9b137
commit fbf56e27a0

View File

@ -21,7 +21,7 @@ module OS
# This can be compared to numerics, strings, or symbols
# using the standard Ruby Comparable methods.
def version
@version ||= Version.new(full_version.to_s[/10\.\d+/])
@version ||= Version.new(full_version.to_s[/^\d+\.\d+/])
end
# This can be compared to numerics, strings, or symbols