aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/ghostscript.rb
diff options
context:
space:
mode:
authorJack Nagel2012-08-18 13:34:31 -0500
committerJack Nagel2012-08-18 15:53:04 -0500
commit6ccf2aa253bfad33d527e80f36832fab96601ff2 (patch)
tree438ec938bbcfd741d1a81ea6d093a9077e5cd737 /Library/Formula/ghostscript.rb
parent41994f942380fa7eaad92b24b8e0e38be021f916 (diff)
downloadhomebrew-6ccf2aa253bfad33d527e80f36832fab96601ff2.tar.bz2
Version: build-in devel version comparisons
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>
Diffstat (limited to 'Library/Formula/ghostscript.rb')
0 files changed, 0 insertions, 0 deletions