Error: undefined method `factory' for Formula:Class

今日,brew updateとしたら,以下のようなエラーが.

$ brew update
Error: undefined method `factory' for Formula:Class
Please report this bug:
    https://github.com/mxcl/homebrew/wiki/troubleshooting
/usr/local/Library/Homebrew/cmd/update.rb:61:in `update'
/usr/local/Library/Homebrew/cmd/update.rb:60:in `each'
/usr/local/Library/Homebrew/cmd/update.rb:60:in `update'
/usr/local/Library/brew.rb:95:in `send'
/usr/local/Library/brew.rb:95

基本的には,brew doctorで問題点を発見するのだが,つい先日いろいろと直したばかりなので,問題なし.

$ brew doctor
Your system is ready to brew.

さらに,git statusで何か自分で弄ってしまった部分がないか調べたが,それもなし.

$ cd /usr/local
$ git status
# On branch master
nothing to commit, working directory clean

困ったところで,masterにHEADを戻してみる(変えた覚えはないのだが)

$ git pull origin master
From https://github.com/mxcl/homebrew
 * branch            master     -> FETCH_HEAD
Already up-to-date.
$ brew update
Already up-to-date.

解決!