Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix comparison bug when comparing non-numeric prereleases
Reference: hashicorp#61 This fixes a bug when comparing non-numeric prereleases of different set sizes. Makes it so that X.Y-alpha is considered smaller than X.Y-alpha.beta because a larger set of pre-release fields should have a higher precedence than a smaller set if all of the preceding identifiers are equal. When considering prerelease parts that are empty, use the other to decide regardless if it is numeric or not. If our self part is empty then the other part must be the larger set. If the other part is empty then the self part must be the larger set. Also fix and add a few additional test cases.
- Loading branch information