Posted by naruse on 25 Dec 2015

We are pleased to announce the release of Ruby 2.3.0.

This is the first stable release of the Ruby 2.3 series. It introduces many new features, for example:

A frozen string literal pragma is introduced. With Ruby 2.1, "str".freeze has been optimized to reduce object allocation. Ruby 2.3 introduces a new magic comment and command line option to freeze all string literals in the source files. Additionally for debugging, you can get where the object is created on "can't modify frozen String" error by using the --debug=frozen-string-literal command line option.

A safe navigation operator (so-called lonely operator) &. , which already exists in C#, Groovy, and Swift, is introduced to ease nil handling as obj&.foo . Array#dig and Hash#dig are also added. Note that this behaves like try! of Active Support, which specially handles only nil .

The did_you_mean gem is bundled. The did_you_mean gem shows the candidates on the NameError and NoMethodError to ease debugging.

RubyVM::InstructionSequence#to_binary and .load_from_binary are introduced as experimental features. With these features, we can make a ISeq (bytecode) pre-compilation system.

Ruby 2.3 also includes many performance improvements, for example reconsidering method entry data structure, introducing new table data structure, optimizing Proc#call, machine code level tuning for object allocation and method calling code, smarter instance variable data structure, exception: false keyword argument support on Socket#*_nonblock methods, and so on. Check the “Implementation improvements” section in the NEWS file.

For a complete list of new features and compatibility notes, please see NEWS and ChangeLog.

With those changes, 2946 files changed, 104057 insertions(+), 59478 deletions(-) since Ruby 2.2.0!

Merry Christmas, Happy Holidays, and enjoy programming with Ruby 2.3!

Download