Fix ruby version parsing