How to write a piece of code to compare some versions strings and get the newest?
For example strings like: \'0.1\', \'0.2.1\', \'0.44\'.
\'0.1\', \'0.2.1\', \'0.44\'
Gem::Version is the easy way to go here:
Gem::Version
%w<0.1 0.2.1 0.44>.map {|v| Gem::Version.new v}.max.to_s => "0.44"