diff --git a/libexec/rbenv-version-file b/libexec/rbenv-version-file index 2413834f..f1cfbd2a 100755 --- a/libexec/rbenv-version-file +++ b/libexec/rbenv-version-file @@ -5,7 +5,7 @@ set -e find_local_version_file() { local root="$1" - while [ -n "$root" ]; do + while [[ -n "$root" && ! "$root" =~ ^//[^/]*$ ]]; do if [ -e "${root}/.ruby-version" ]; then echo "${root}/.ruby-version" exit