Ruby units compatibility

Hi. I rebased the ruby-units compatibility commits on your new master.