fix pessimistic upgrade operator for pre-1.0 versions

fixes #1
This commit is contained in:
Fox
2016-08-02 00:07:04 -07:00
committed by GitHub
parent 35c69808f5
commit 32679b1947

View File

@@ -173,6 +173,7 @@ end
-- if a and b are versions, a ^ b means "b is backwards-compatible with a"
-- in other words, "it's safe to upgrade from a to b"
function mt:__pow(other)
if self.major == 0 then return false end
return self.major == other.major and
self.minor <= other.minor
end