[Rubygems-developers] Advice on version numbers for alpha releases?

Jim Weirich jim at weirichhouse.org
Thu Aug 18 14:45:16 EDT 2005

Lyle Johnson said:
> On 8/18/05, Jim Weirich <jim at weirichhouse.org> wrote:
>> RubyGems versions are all numeric by design, so there is no way to
>> append
>> an "alpha" or "beta" designation.  I tend to use 3 digit versions for
>> official releases and 4 digit versions for releases between official
>> releases.
> For some reason, I didn't realize that four-digit version numbers were
> allowed. Are there any examples of this in the wild? The RubyGems
> documentation (at docs.rubygems.org) doesn't appear to have any
> examples. When you're doing an update of gems using this numbering
> scheme, is a gem with version number "" considered newer than a
> gem with version number "1.4.0"? How does the comparison work?

Hmmm ... you are right.  The documentation never explicitly says three
part versions, although that is the recommended scheme and most of the
examples use three part versions.  However, a version may have as many
parts as you want, provided each part is numeric and the parts are
separated by a period.

Look at http://onestepback.org/betagems/gems for a number of my beta gems
with four digit versions.  I don't generally release the four part betas
on rubyforge, but I do often upload them to
http://onestepback.org/betagems for limited release.

When comparing versions with a different number of parts, the shorter
version is extended on the right with zeros.

-- Jim Weirich     jim at weirichhouse.org    http://onestepback.org
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)

More information about the Rubygems-developers mailing list