brew updateで、Error: uninitialized constant Formulary::HOMEBREW_CORE_FORMULA_REGEX


$ brew update
Error: uninitialized constant Formulary::HOMEBREW_CORE_FORMULA_REGEX
Please report this bug:
https://git.io/brew-troubleshooting
/usr/local/Library/Homebrew/formulary.rb:227:in `loader_for'
/usr/local/Library/Homebrew/formulary.rb:176:in `factory'
/usr/local/Library/Homebrew/cmd/update.rb:173:in `block in report'
/usr/local/Library/Homebrew/cmd/update.rb:159:in `each_line'
/usr/local/Library/Homebrew/cmd/update.rb:159:in `report'
/usr/local/Library/Homebrew/cmd/update.rb:24:in `update'
/usr/local/Library/brew.rb:140:in `

'
というエラーが出た。

homebrew/Troubleshooting.md at master – Homebrew/homebrew – GitHub

Check for common issues

Run brew update — then try again.
と書いてあったので、試したら大丈夫だった。
$ brew update
Already up-to-date.