$OLDPWD is a standard shell variable that contains the previous working directory as set by the "cd" command. No need to save $PWD to some custom variable. (We could also have used "cd -" but it prints out $OLDPWD too.)
${RBENV_ROOT}/version
rbenv help
rbenv root