Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add Version.slice to compat suite

Refs #14299.
  • Loading branch information...
commit 3a9069d1f59915e84f89cd258990dadad4e79790 1 parent 7bbca52
@mxcl mxcl authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 Library/Homebrew/compat/compatibility.rb
View
8 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
Please sign in to comment.
Something went wrong with that request. Please try again.