Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Commit

Permalink
Add Version.slice to compat suite
Browse files Browse the repository at this point in the history
Refs #14299.
  • Loading branch information
mxcl committed Aug 28, 2012
1 parent 7bbca52 commit 3a9069d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Library/Homebrew/compat/compatibility.rb
Expand Up @@ -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.