Better detection of ruby version