sstephenson/rbenv — pull request #170 by jeremy (2011-12-23 19:07:17+00:00)
Title: Ensure shims don't temporarily disappear when rehashed

Starting a process that uses a shim during `rbenv rehash` will break in subtle ways, like falling back on the next one in `PATH`, because the shims dir is wiped then recreated. This happens fairly often since `rbenv init` rehashes.

This fix leaves the existing shims in place, overwrites them, then removes stale ones.

Another approach would be to build a fresh shims dir, atomically symlink it, then delete the old one.