diff options
| author | Esther W | 2017-05-18 13:41:36 -0700 |
|---|---|---|
| committer | Esther W | 2017-05-18 13:41:36 -0700 |
| commit | 4da2f24b0ee819475daae14a839d953777767e8c (patch) | |
| tree | 22e6b9b549f1d235865153a406815ba2ae92e873 /Library | |
| parent | 37222c195364e3e1c04ee8675a5f0470c2284713 (diff) | |
| download | brew-4da2f24b0ee819475daae14a839d953777767e8c.tar.bz2 | |
Remove to_s method
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/brew.rb | 1 | ||||
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/cli.rb | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/Library/Homebrew/brew.rb b/Library/Homebrew/brew.rb index 9b2ff75f0..03eeb8a18 100644 --- a/Library/Homebrew/brew.rb +++ b/Library/Homebrew/brew.rb @@ -21,6 +21,7 @@ if ARGV == %w[--version] || ARGV == %w[-v] end def require?(path) + path ||= "" require path rescue LoadError => e # we should raise on syntax errors but not if the file doesn't exist. diff --git a/Library/Homebrew/cask/lib/hbc/cli.rb b/Library/Homebrew/cask/lib/hbc/cli.rb index c8fe39171..37784f4c3 100644 --- a/Library/Homebrew/cask/lib/hbc/cli.rb +++ b/Library/Homebrew/cask/lib/hbc/cli.rb @@ -113,7 +113,7 @@ module Hbc if command.respond_to?(:run) # usual case: built-in command verb command.run(*rest) - elsif require?(which("brewcask-#{command}.rb").to_s) + elsif require?(which("brewcask-#{command}.rb")) # external command as Ruby library on PATH, Homebrew-style elsif command.to_s.include?("/") && require?(command.to_s) # external command as Ruby library with literal path, useful |
