diff options
| author | Markus Reiter | 2016-09-25 22:47:31 +0200 |
|---|---|---|
| committer | Markus Reiter | 2016-10-03 02:34:53 +0200 |
| commit | bc143bb4701eb4f5fdcd19036b9232a32f4e52ae (patch) | |
| tree | ac0262eb4f65aa6b5c4023b4fba943d89a313623 /Library/Homebrew/cask/lib/hbc/dsl.rb | |
| parent | bc2d676b6f590d0ddd2987699624f6718384b641 (diff) | |
| download | brew-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.rb | 9 |
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 |
