Rewrite ruby version extraction.