Improvements to RubyInstallation CompareTo

- This change removes the redundation call to String compareTo
- It also adds a test for the compare to function