Site Loader

Ruby 2.6, the newest model of the venerable dynamic language, is now out there as a manufacturing launch.

What’s new in Ruby 2.6

Ruby 2.6 provides an preliminary implementation of a JIT (just-in-time compiler) to enhance efficiency of program execution. Ruby’s JIT compiler writes C code to disk and produces a C compiler course of to generate native code. The JIT compiler is supported when Ruby is constructed by the GCC compiler, Clang, or Microsoft Visible C++, which have to be out there at runtime.

Different new options in Ruby 2.6 embrace:

  • In a change to the language, $SAFE is a course of international state and zero could be set once more.
  • Improved efficiency of block.name when block is handed in as a block parameter.
  • Proc#name has been sped up.
  • The experimental RubyVM::ASTmodule, which has a parse methodology that parses a code of string and returns AST nodes. Additionally, the parse_ file methodology parses a code file and return AST nodes.
  • The experimental RubyVM::AST::Nodeclass surfaces location info and kids nodes from Node objects.
  • Fixed names might begin with a non-ASCII capital letter.
  • Infinite ranges, which work as in the event that they haven’t any finish, are launched.
  • Transient Heap (theap) is launched, with theap serving as a managed heap for short-lived reminiscence objects which are referenced by particular courses.
  • Unicode help is now at model 11.
  • Bundler, for managing gem dependencies, is now a default gem.

The place to obtain Ruby 2.6

You may obtain Ruby 2.6 from the Ruby venture web site.

Earlier model: Ruby 2.5

Arriving on Christmas Day 2017, Ruby 2.5.zero is the primary secure launch within the 2.5 sequence.

It boosts efficiency by 5 to 10 % by eradicating hint directions from bytecode that has been discovered to be overhead. A dynamic instrumentation method is used as an alternative. Additionally, block passing by a block parameter has been made thrice sooner than it was in Ruby 2.four, by means of use of the Lazy Proc allocation method.

Post Author: evansvil

Leave a Reply

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