2 Commits

Author SHA1 Message Date
Fox
32679b1947 fix pessimistic upgrade operator for pre-1.0 versions
fixes #1
2016-08-02 00:07:04 -07:00
kikito
35c69808f5 fixes changelong in readme 2015-10-24 10:28:48 +02:00
2 changed files with 3 additions and 1 deletions

View File

@@ -98,8 +98,9 @@ busted
* Removed global variable which was declared by mistake
* Changed spec tool from telescope to busted
* Changed README format from textile to markdown
## v.1.2.0:
* Fix error: builds were being used for comparison, but according with semver 2.0.0 they should be ignored (so v'1.0.0-build1' is equal to v'1.0.0-build2')
* Fix error: builds were being used for comparison, but according with semver 2.0.0 they should be ignored (so v'1.0.0+build1' is equal to v'1.0.0+build2')
* Fix several errors and inconsistencies in the way the comparisons where implemented.
* Added a lot more tests to cover more edge cases when comparing versions

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