Ruby units compatibility

This patch fixes the compatibility issues I described in issue #64.