mirror of
https://github.com/mistydemeo/tigerbrew.git
synced 2026-11-28 03:49:49 -05:00
6ccf2aa253bfad33d527e80f36832fab96601ff2
The heuristic used by the default version comparison is simple. A
version string is scanned for strings of digits, split into an array of
these strings, and then an element-wise comparison is done.
This fails when presented with something like
Version.new("1.0.0beta7") <=> Version.new("1.0.0")
because the first three digits match, and the fourth digit of the
receiver (7) is greater than the assumed fourth digit of the parameter
(0).
Fix this by defining an element-wise comparator on a new VersionElement
class. This allows us to correctly compare "alpha", "beta", and "rc"
style version strings, and keeps the logic out of the main version
comparison.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Homebrew
Features, usage and installation instructions are summarized on the homepage.
What Packages Are Available?
- You can browse the Formula directory on GitHub.
- Or type
brew searchfor a list. - Or run
brew serverto browse packages off of a local web server. - Or visit braumeister.org to browse packages online.
More Documentation
brew help or man brew or check our wiki.
Who Are You?
I'm Max Howell and I'm a splendid chap.
Description
Read-only mirror of https://github.com/mistydemeo/tigerbrew
https://github.com/mistydemeo/tigerbrew
77 MiB
0 Stars
2 Watchers
1 Forks
Languages
Ruby
98.2%
Shell
0.7%
HTML
0.6%
Roff
0.5%