[ruby] update rbenv check to be POSIX compatible