aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/lib/hbc/dsl.rb
diff options
context:
space:
mode:
authorMarkus Reiter2016-09-25 22:47:31 +0200
committerMarkus Reiter2016-10-03 02:34:53 +0200
commitbc143bb4701eb4f5fdcd19036b9232a32f4e52ae (patch)
treeac0262eb4f65aa6b5c4023b4fba943d89a313623 /Library/Homebrew/cask/lib/hbc/dsl.rb
parentbc2d676b6f590d0ddd2987699624f6718384b641 (diff)
downloadbrew-bc143bb4701eb4f5fdcd19036b9232a32f4e52ae.tar.bz2
Support `audit` for multilingual casks.
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