aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMisty De Meo2017-05-29 16:35:30 -0700
committerMisty De Meo2017-06-03 20:47:46 -0700
commit4ffca8faa2fb055ec5a8329496fe0bfe532f223a (patch)
treee0b5e2de769d0a6732c7627af6b5c1b42f5a33fb /Library
parentffa65c749856d525edef6029d774de2486d1cccd (diff)
downloadbrew-4ffca8faa2fb055ec5a8329496fe0bfe532f223a.tar.bz2
cask_loader: fix return types for .can_load?
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cask/lib/hbc/cask_loader.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/cask_loader.rb b/Library/Homebrew/cask/lib/hbc/cask_loader.rb
index 1b231a097..a0c44d9b4 100644
--- a/Library/Homebrew/cask/lib/hbc/cask_loader.rb
+++ b/Library/Homebrew/cask/lib/hbc/cask_loader.rb
@@ -54,7 +54,7 @@ module Hbc
class FromURILoader < FromPathLoader
def self.can_load?(ref)
- ref.to_s =~ ::URI.regexp
+ ref.to_s.match?(::URI.regexp)
end
def initialize(url)
@@ -80,7 +80,7 @@ module Hbc
class FromTapLoader < FromPathLoader
def self.can_load?(ref)
- ref.to_s =~ HOMEBREW_TAP_CASK_REGEX
+ ref.to_s.match?(HOMEBREW_TAP_CASK_REGEX)
end
def initialize(tapped_name)