aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/lib/hbc/dsl.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/cask/lib/hbc/dsl.rb')
-rw-r--r--Library/Homebrew/cask/lib/hbc/dsl.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/dsl.rb b/Library/Homebrew/cask/lib/hbc/dsl.rb
index bae395726..9970f8395 100644
--- a/Library/Homebrew/cask/lib/hbc/dsl.rb
+++ b/Library/Homebrew/cask/lib/hbc/dsl.rb
@@ -122,8 +122,13 @@ module Hbc
regexes_or_strings = regexes_or_strings - [:default] + [%r{^en}]
end
- case language
- when *regexes_or_strings
+ regexes_or_strings.each do |regex_or_string|
+ if regex_or_string.class == language.class
+ next unless regex_or_string == language
+ else
+ next unless regex_or_string =~ language
+ end
+
@language = block.call
return
end