aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/lib
diff options
context:
space:
mode:
authorMisty De Meo2017-06-03 21:10:39 -0700
committerGitHub2017-06-03 21:10:39 -0700
commita4aacbc15eecb9bb2fc67ab2a70f0e3d35020ba3 (patch)
treed855ba10776e630e7c24b75f4eecd6d3dd8b07f5 /Library/Homebrew/cask/lib
parent98959f1fb9c667abde593dcd92128aed5367d29a (diff)
parent087035868aece3e4836ec69a72a0e3fdf96c64c0 (diff)
downloadbrew-a4aacbc15eecb9bb2fc67ab2a70f0e3d35020ba3.tar.bz2
Merge pull request #2699 from mistydemeo/fix_boolean_types
Fix boolean types
Diffstat (limited to 'Library/Homebrew/cask/lib')
-rw-r--r--Library/Homebrew/cask/lib/hbc/cask_loader.rb4
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli/abstract_command.rb2
2 files changed, 3 insertions, 3 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)
diff --git a/Library/Homebrew/cask/lib/hbc/cli/abstract_command.rb b/Library/Homebrew/cask/lib/hbc/cli/abstract_command.rb
index 7470e36db..cdb7f5ec8 100644
--- a/Library/Homebrew/cask/lib/hbc/cli/abstract_command.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli/abstract_command.rb
@@ -15,7 +15,7 @@ module Hbc
end
def self.abstract?
- name.split("::").last =~ /^Abstract[^a-z]/
+ name.split("::").last.match?(/^Abstract[^a-z]/)
end
def self.visible