ruby version regex fix