mxcl/homebrew — pull request #13075 by nodrew (2012-06-28 13:18:36+00:00)
Title: ENV['PATH'] is getting the /usr/bin prepended every time, causing system bins to get preference over homebrew bins

...ssues/151#issuecomment-6629287, it appears that MacOS.dev_tools_path is a Pathname type and thus will always evaluate as not being in the path, unless it is explicitly converted to a string. I'm not sure if there is a case that converts this to a string somewhere else in the code, however it seems that this path is always prepended to the rest, which means that homebrew installed tools are added to the front of the list by default.

As a precaution, I also switched the two prepends, so that the HOMEBREW_PREFIX bin is always given higher preference, in case neither of them are in the path.