This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Add Version.slice to compat suite

Refs #14299.
  • Loading branch information...
mxcl committed Aug 28, 2012
1 parent 7bbca52 commit 3a9069d1f59915e84f89cd258990dadad4e79790
Showing with 8 additions and 0 deletions.
  1. +8 −0 Library/Homebrew/compat/compatibility.rb
@@ -217,3 +217,11 @@ def mountain_lion?
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

0 comments on commit 3a9069d

Please sign in to comment.