From ba3c46d24fe6423845cc5e827eb94b3427d75a10 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sat, 22 Apr 2017 16:28:07 +0100 Subject: More deprecations. Deprecate more methods. Internal APIs have been verified to be unused elsewhere and removed. External APIs have had deprecation methods added. Existing deprecations have been either upgraded to produce warnings or no longer deprecated and the reasoning documented. --- Library/Homebrew/extend/ENV/super.rb | 5 ----- Library/Homebrew/extend/os/mac/diagnostic.rb | 2 +- Library/Homebrew/extend/pathname.rb | 5 ++--- 3 files changed, 3 insertions(+), 9 deletions(-) (limited to 'Library/Homebrew/extend') diff --git a/Library/Homebrew/extend/ENV/super.rb b/Library/Homebrew/extend/ENV/super.rb index 0935647f5..07c03ec75 100644 --- a/Library/Homebrew/extend/ENV/super.rb +++ b/Library/Homebrew/extend/ENV/super.rb @@ -325,11 +325,6 @@ module Superenv def set_x11_env_if_installed end - - # This method does nothing in superenv since there's no custom CFLAGS API - # @private - def set_cpu_flags(*_args) - end end class Array diff --git a/Library/Homebrew/extend/os/mac/diagnostic.rb b/Library/Homebrew/extend/os/mac/diagnostic.rb index fb6b30836..ff936c75a 100644 --- a/Library/Homebrew/extend/os/mac/diagnostic.rb +++ b/Library/Homebrew/extend/os/mac/diagnostic.rb @@ -263,7 +263,7 @@ module Homebrew SSL_CERT_DIR support was removed from Apple's curl. If fetching formulae fails you should: unset SSL_CERT_DIR - and remove it from #{Utils::Shell.shell_profile} if present. + and remove it from #{Utils::Shell.profile} if present. EOS end diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb index eb254c624..690979e4e 100644 --- a/Library/Homebrew/extend/pathname.rb +++ b/Library/Homebrew/extend/pathname.rb @@ -365,9 +365,8 @@ class Pathname unless method_defined?(:/) def /(other) - unless other.respond_to?(:to_str) || other.respond_to?(:to_path) - opoo "Pathname#/ called on #{inspect} with #{other.inspect} as an argument" - puts "This behavior is deprecated, please pass either a String or a Pathname" + if !other.respond_to?(:to_str) && !other.respond_to?(:to_path) + odeprecated "Pathname#/ with #{other.class}", "a String or a Pathname" end self + other.to_s end -- cgit v1.2.3