This document is a list of user visible feature changes made between releases except for bug fixes.

Note that each entry is kept so brief that no reason behind or reference information is supplied with. For a full list of changes with all sufficient information, see the ChangeLog file or Redmine (e.g. https://bugs.ruby-lang.org/issues/$FEATURE_OR_BUG_NUMBER)

Range#initialize no longer hides exceptions when comparing begin and end with #<=> and raise a “bad value for range” ArgumentError but instead lets the exception from the #<=> call go through. [Feature #7688]

Support branch coverage and method coverage measurement. [Feature #13901] Branch coverage tells you which branches are executed, and which not. Method coverage tells you which methods are invoked, and which not. By running a test suite with this new feature, you can know which branches and methods are executed by a test, and evaluate total coverage of a test suite more strictly.

You can specify the measuring target by an option to `Coverage.start`:

Coverage.start(lines:true, branches:true, methods:true)

After some Ruby files are loaded, you can use `Coverage.result` to get the coverage result:

The result type of line coverage is not changed; it is just an array that contains numbers, which means the count that each line was executed, or `nil`s, which means that the line is not relevant.

The result type of branch coverage is:

{ (jumpbase) => { (jumptarget) => (counter) } }

where jump base and targets have the format

[type, unique-id, start lineno, start column, end lineno, end column]

For example, `[:if, 0, 2, 1, 6, 4]` reads an `if` statement that ranges from line 2 and column 1, to line 6 and column 4. `[:then, 1, 3, 2, 3, 8]` reads a `then` clause that ranges from line 3 and column 2, to line 3 and column 8. Note that lineno starts from 1, and that columnno starts from 0. So, the above example shows a branch from the `if` to the `then` was never executed, and a branch from the `if` to the `else` was executed twice.