After installing Yosemite, I was unable to run brew or ruby.
I was getting this error on brew update:
/usr/local/bin/brew: /usr/local/Library/brew.r
Editing the script means brew update won't work; there are local edits to tracked files which causes the git pull to fail.
brew update
git pull
I did this, which I suspect is cleaner:
cd /usr/local/Library git pull -q origin refs/heads/master:refs/remotes/origin/master
There are no complaints from brew doctor.
brew doctor