Last Updated: February 25, 2016
·
1.065K
· mbillard

Comparing version strings in Ruby

Comparing version strings can be troublesome. You need to extract each digit and compare them against each other. Or simply make use of Gem::Version:

Gem::Version.new('0.10.2') > Gem::Version.new('0.8.5') # => true

Source