diff options
| author | Max Howell | 2012-08-28 12:11:34 -0400 |
|---|---|---|
| committer | Max Howell | 2012-08-28 12:11:46 -0400 |
| commit | 3a9069d1f59915e84f89cd258990dadad4e79790 (patch) | |
| tree | 5bf460da0ddd56116b67ff773392b8cf0dfd98a7 /Library | |
| parent | 7bbca52fe01f29076bbd2869249125905e1b4fe8 (diff) | |
| download | homebrew-3a9069d1f59915e84f89cd258990dadad4e79790.tar.bz2 | |
Add Version.slice to compat suite
Refs #14299.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/compat/compatibility.rb | 8 |
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 |
