Brew fails after installing Yosemite

If you upgrade to MacOSX Yosemite and get this

Robs-iMac:~ rl$ brew install

/usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory

/usr/local/bin/brew: line 26: /usr/local/Library/brew.rb: Undefined error: 0

you need to do this

cd /usr/local/Library

git pull origin master

Then you’re good again.