4

A recent question, "What happened with Ruby 1.9.2?", made me wonder about version numbers for MRI Ruby mean.

The scheme MRI Ruby uses differs from that of semver.org.

How does versioning work in MRI Ruby, and what do the major (1), minor (9), teeny (3) and patchlevel (448) values mean in ruby 1.9.3p448? For example, what kind of changes are allowed in an increase in patchlevel, and what kind of changes are allowed in an increase of teeny?

Community
  • 1
  • 1
Andrew Grimm
  • 78,473
  • 57
  • 200
  • 338
  • Just came across Matz stating that minor versions greater than 9 would be a bad thing: http://youtu.be/zQvmgN-0imY?t=9m59s – Andrew Grimm Aug 10 '13 at 04:54

2 Answers2

5

(Here the terms differ from the classic semver.org where 2.0.0 is composed of MAJOR.MINOR.PATCH: The ruby scheme, as illustrated in version.h or test_gem.rb, is more V2.0.0pxxx, as in MAJOR.MINOR.TEENY.PATCHLEVEL)

Previously, a version number for Ruby with an odd minor version number signified an experimental version. So Ruby 1.7 was experimental, while Ruby 1.8 was a production version.
The Ruby core team has changed this so that, with the advent of Ruby 1.9.0, Ruby 1.9 is no longer considered experimental, although it may be a while before the implementation becomes ready for production use

Today, a minor version contains semantic differences:

On the other hand, Ruby 1.9 is not completely backward compatible with Ruby 1.8. Some of the semantics have changed. For example, block arguments are now local to the block, and there are subtle changes to block semantics.The changes mean that many existing Ruby programs will need some amount of conversion to take advantage of Ruby 1.9.

  • teeny (like 1.9.2) adds new features

  • patchlevel is more about a build number, adding internal fixes, security fixes, promoting a ruby version to "production level" (as that was the case for 1.9.2-p290)

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • As I understand your answer, it goes like this under the present system: Ruby's MAJOR.MINOR complex corresponds to semantic MAJOR, Ruby's TEENY corresponds to semantic MINOR, and Ruby's PATCHLEVEL corresponds to semantic TEENY, and there is no clear distinction between the roles of Ruby's MAJOR and MINOR. Am I right? – sawa Jul 19 '13 at 04:37
  • @sawa I would argue that ruby MAJOR is for clear Language changes, as opposed to Ruby.MINOR, which only add semantic changes without necessarily breaking backward compatibility. Ruby TEENY would be semver PATCH, and Ruby PATCHLEVEL is semver build numbers. – VonC Jul 19 '13 at 05:14
1

They have changed to quasi-semantic versioning starting with Ruby 2.1.0. See https://www.ruby-lang.org/en/news/2013/12/21/semantic-versioning-after-2-1-0/ for further details, but the version numbers will now have the following meaning:

MAJOR: increased when incompatible change which can’t be released in MINOR
    Reserved for special events
MINOR: increased every christmas, may be API incompatible
TEENY: security or bug fix which maintains API compatibility
    May be increased more than 10 (such as 2.1.11), and will be released every 2-3 months.
PATCH: number of commits since last MINOR release (will be reset at 0 when releasing MINOR)
Community
  • 1
  • 1
iheggie
  • 2,011
  • 23
  • 23
  • I agree with the clarification that it is "quasi-semantic" - you need to check MAJOR.MINOR for API/ABI compatibility not just MAJOR. – iheggie May 25 '14 at 10:22