Reputation: 2357
I am curious on what basis ruby and ror versions are named. For example, after ruby 1.9.3, its version is 2.0 instead of 1.10 or 1.9.4, and so in rails. There must be some convention or rule.
Upvotes: 2
Views: 138
Reputation: 369428
Ruby and Rails, like many other projects follow Semantic Versioning.
They don't always follow it to the letter, though. For example, Ruby 1.9 is backwards-incompatible with Ruby 1.8, whereas Ruby 2.0 is mostly compatible with Ruby 1.9, so really Ruby 1.9 should have been Ruby 2.0 and Ruby 2.0 should have been Ruby 2.1.
In this particular case, there were historic "marketing" reasons for that: the term "Ruby 2.0" has been used in the Ruby community for over 10 years now to mark a specific "mythical" version with specific, often talked-about features like scoped monkey patching and traits. Releasing a version without those features but still calling it "2.0" would have been more confusing than breaking the rules of Semantic Versioning. (Actually, Ruby 2.0 was released without traits and it has led to confusion!)
OTOH, it was impossible to call it "1.10", because the RUBY_VERSION
constant returns the version as a String
, and a lot of tools (incorrectly) do something like
if RUBY_VERSION <= '1.8'
def foo
end
end
which would break, because the String
'1.10'
is actually less than the String
'1.8'
.
Therefore, it was decided to settle on 1.9.
Upvotes: 5
Reputation: 22596
I think Ruby and Rails follow more or less semantic versioning, roughly meaning if the version is X.Y.Z, you change Z when you just fix a bug. Change Y if you add something (therefore all program depending on it, can say I need at least version X.Y) and you change X if you introduce backward incompatibility). X, Y and Z are usually called, Major, Minor and revision .
Upvotes: 1