mxcl/homebrew — pull request #13689 by brandonblack (2012-07-28 18:42:31+00:00)
Title: Use writable_real? to resolve false warnings in 'brew doctor'

Permissions for /usr/local under OS X Mountain Lion changed a bit.

For single user installs of homebrew there was very little impact, but if you're using a multi-user/system wide install of homebrew and you have permissions on /usr/local set at a group level 'brew doctor' doesn't seem to pick that up correctly.

A quick change to check if /usr/local is writable via writable_real? rather than writable? resolves the situation.

An awesome, well detailed explanation is available here:
http://apple.stackexchange.com/questions/51668/how-to-resolve-permissions-errors-on-os-x-lion-after-homebrew-install#_=_