I was getting this when I ran “brew update” after a long time:
antonperez-mbpro:~ anton.perez$ brew update
Checking out files: 100% (2942/2942), done.
Error: undefined method `to_sym’ for nil:NilClass
Please report this bug:
All I did was run it again and it worked. If it doesn’t work for you, do a “brew doctor” to continue troubleshooting.