Permalink
Browse files

Change behavior of SemVer.satisfies to something that is (I think) mo…

…re correct and appropriate
  • Loading branch information...
1 parent d9b89a5 commit 127c53f3592c54226802b50e594f7597005bb06d @robsimmons robsimmons committed Nov 3, 2011
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/semver.sml
View
@@ -164,11 +164,14 @@ struct
(#1 ver = major)
| (major, SOME minor, NONE, _) =>
(#1 ver = major andalso #2 ver = minor)
- | (major, SOME minor, SOME patch, special) =>
+ | (major, SOME minor, SOME patch, NONE) =>
+ (#1 ver = major andalso #2 ver = minor andalso #3 ver = patch)
+ | (major, SOME minor, SOME patch, SOME special) =>
(#1 ver = major
andalso #2 ver = minor
andalso #3 ver = patch
- andalso #4 ver = special)
+ andalso isSome (#4 ver)
+ andalso String.isPrefix special (valOf (#4 ver)))
(** Enumerate the various paths that this version could give rise to.
e.g., for version 1.6.2beta1, we could potentially have these paths:

0 comments on commit 127c53f

Please sign in to comment.