aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/macos
diff options
context:
space:
mode:
authorJack Nagel2013-02-06 22:49:43 -0600
committerJack Nagel2013-02-07 12:39:54 -0600
commit7fbeb0df3d904a5a621986595ee4ca74176427ea (patch)
treee83d114bfde1fd80aad0d6b7b4ec8dc9aaf2abd9 /Library/Homebrew/macos
parentb41bb64c7a89c56330146f8f116a546515f8acd1 (diff)
downloadbrew-7fbeb0df3d904a5a621986595ee4ca74176427ea.tar.bz2
MacOSVersion -> MacOS::Version
Diffstat (limited to 'Library/Homebrew/macos')
-rw-r--r--Library/Homebrew/macos/version.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/Library/Homebrew/macos/version.rb b/Library/Homebrew/macos/version.rb
new file mode 100644
index 000000000..090b1ffb7
--- /dev/null
+++ b/Library/Homebrew/macos/version.rb
@@ -0,0 +1,16 @@
+require 'version'
+
+module MacOS
+ class Version < ::Version
+ def <=>(other)
+ v = case other
+ when :mountain_lion then 10.8
+ when :lion then 10.7
+ when :snow_leopard then 10.6
+ when :leopard then 10.5
+ else other.to_s
+ end
+ super(Version.new(v))
+ end
+ end
+end