issue #179

Hook to issue #179, due to the determination of Ruby version, it's a more compact one, but not sure the 'better way' you mention in the file.