It's not that this is a preferred way to set a global version (one
should use `rbenv global <version>` instead), but this fixes the
function purely for correctness: all parent directories should be
scanned, even the root directory.
Fixes#745
finding_local_version_file is extremely slow, when working directory is under the UNC path.
Because //host/.rbenv-version and //.rbenv-version do not exist, but testing them is so slow.
It's the reason to make a serious delay of the response, when the Ruby runs with a current working directory under the UNC path under Cygwin environment.
A response of before applying this patch.
//somehost/somedir $ time ruby -e "exit"
real 0m13.922s
user 0m0.168s
sys 0m0.287s
A response of after applying this patch.
//somehost/somedir $ time ruby -e "exit"
real 0m0.721s
user 0m0.153s
sys 0m0.319s