From: Eric Hodel Date: 2011-11-12T06:25:32+09:00 Subject: Re: referring to version numbers in a gem On Nov 11, 2011, at 1:02 PM, Phillip Gawlowski wrote: > On Fri, Nov 11, 2011 at 9:28 PM, Chad Perrin wrote: >> What's the best way to specify the version number and give the code >> executed when the --version argument is supplied the ability to access >> that version number? > > module MyAwesomeTool > VERSION = "0.1.0-1" # Major, minor, tiny, patch-level > end > > puts MyAwesomeTool::VERSION Just Use Dots Then Gem::Version can parse it and you can do comparisons without funny-business.