The sixth update of the Ruby 2.6.0 programming language is here


After a year of development, the Ruby 2.6.0 release is published, a dynamic object-oriented programming language, characterized by high software development efficiency and incorporating the best features of Perl, Java, Python, Smalltalk, Eiffel, Ada and Lisp.

The project code is distributed under the BSD licenses ("2-clause BSDL") and "Ruby", which refers to the latest GPL license and is fully GPLv3 compliant.

Ruby 2.6 is the sixth major version, prepared as part of a planned development process, which involves allocating a year to prepare functional improvements and create corrective versions every 2-3 months.

Main new features in Ruby 2.6.0

With this new release of Ruby added an experimental implementation of the JIT compiler, which allows you to significantly improve the performance of applications in the Ruby language.

Unlike traditional JIT compilers, which generate machine instructions on the fly, the proposed JIT compiler in Ruby first writes the C code to disk, then calls the external C compiler to generate the machine instructions (GCC supported , Clang and Microsoft VC ++).

To enable JIT, you must specify the "–jit" option when starting ruby ​​or set this option in the RUBYOPT environment variable.

Compared to Ruby 2.5, the inclusion of JIT averages 1.7 times the performance of CPU intensive applications.

At the same time, development is still experimental and ill-suited for loads associated with memory intensive work.

Other improvements that were obtained in this version was the RubyVM :: AbstractSyntaxTree experimental module, which provides a parsing method that processes the passed strings as Ruby code and returns an Abstract Syntax Tree (AST) for this code.

Now the alias "#then" can be used to access the method "Kernel # yield_self". For "Array # |" methods and "Array # -" suggested more readable aliases "Array # union" and "Array # Difference".

Constant names can now start with uppercase letters other than ASCII.

Support was also provided for Transient Heap, theap intended for short lifespan objects using specific classes (Array, Hash, Object, Struct).


For example, thanks to theap, creating small, short-lived existing hashes is now twice as fast. The rdoc test showed an increase in yield of 6-7%.

To increase the performance of context switches, native implementations of coroutines are proposed for arm32, arm64, ppc64le, win32, win64, x86, and amd64 architectures. "Fiber.yield" and "Fiber # resume" on 64-bit Linux systems now run almost 5 times faster.

In general, intensive programs show a performance increase of 5%.

Major improvements in Ruby 2.6.0

An updated version of RubyGems 3.0.1 has been received, in which support for the "–ri" and "–rdoc" options have been discontinued, instead of which you should use "–document" and "–no-document".

Bundler is now installed by default to manage gem dependencies.

Added support for unfinished ranges, for example, "ary [1 ..]" or "(1 ..). Each {…} ».

Of the other improvements that can be highlighted, you can find:

  • The exception option has been added to the Kernel # system method to raise an exception on error instead of returning false.
  • The oneshot mode has been added to the coverage module, which checks if each row is executing at least once.
  • The Enumerator :: Chain class and the "Enumerable # chain" and "Enumerator # +" methods implemented in it are added to create chains of enumerated values.
  • Support for the operators «<<» and «>>» has been added to the Proc and Method modules, for example, the construction «(f << g) .call (3)» is identical to «f (g ( 3))".

How to install Ruby 2.6.0 on Linux?

To get this new version of Ruby, just open a terminal on your system and type one of the following commands

Debian, Ubuntu and derivatives

sudo apt-get install ruby-full

CentOS, Fedora, and RHEL

sudo yum install ruby


sudo emerge dev-lang/ruby

Arch Linux, Manjaro, Antergos and derivatives

sudo pacman -S ruby


sudo zypper install ruby

The content of the article adheres to our principles of editorial ethics. To report an error click here!.

A comment, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *



  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Daniel said

    The apt-get yum etc commands go to the default repositories of the distributions, which are generally old and you will not have version 2.6 but another old version.