Well I got it sorted. I was hesitant to use the answer in this Stack;
https://stackoverflow.com/questions/15799047/trying-to-remove-yum-which-is-protected-in-centos
As there were comments suggesting yum itself ended up broken. I tried it anyway;
rpm -e --nodeps libffi
And it uninstalled the offending libffi package. Then
yum install libffi-devel
worked fine and I could carry on and install ruby no problem.