aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorMax Howell2012-08-28 12:11:34 -0400
committerMax Howell2012-08-28 12:11:46 -0400
commit396ca3fc590ff1e8e5c6fb784458d7a5a5162b00 (patch)
tree6bc88595a40750708a37102d8a70ad4e9247df9a /Library/Homebrew
parentdf45f8fd099f2984a57ebacf7c112e5c967170d5 (diff)
downloadbrew-396ca3fc590ff1e8e5c6fb784458d7a5a5162b00.tar.bz2
Add Version.slice to compat suite
Refs Homebrew/homebrew#14299.
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/compat/compatibility.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/Library/Homebrew/compat/compatibility.rb b/Library/Homebrew/compat/compatibility.rb
index bbd349249..aff8e0be9 100644
--- a/Library/Homebrew/compat/compatibility.rb
+++ b/Library/Homebrew/compat/compatibility.rb
@@ -217,3 +217,11 @@ module MacOS extend self
end
alias_method :mountain_lion_or_newer?, :mountain_lion?
end
+
+
+class Version
+ def slice *args
+ opoo "Calling slice on versions is deprecated, use: to_s.slice"
+ to_s.slice *args
+ end
+end