Documentation for a newer release is available. View Latest

Ruby

Ruby 2.5

Ruby 2.5 es la última versión estable de Ruby. Incluye numerosas características nuevas y mejoras para satisfacer las necesidades cada vez más diversas y crecientes de Ruby. Con esta importante actualización de Ruby 2.4 en Fedora 26 a Ruby 2.5 en Fedora 28, Fedora se consolida como la plataforma de desarrollo Ruby por excelencia.

Características nuevas:

  • rescue/else/ensure ahora están concedidos para ser utilizados directamente con bloques do/end.

  • Add yield_self to yield given block in its context. Unlike tap, it returns the result of the block.

  • Support branch coverage and method coverage measurement. The branch coverage indicates which branches are executed and which are not. The method coverage indicates which methods are invoked and which are not. By running a test suite with these new features, you will know which branches and methods are executed, and evaluate total coverage of the test suite more strictly.

  • Hash#slice and Hash#transform_keys.

  • Struct.new can create classes that accept keyword arguments.

  • Enumerable #any?, all?, none?, and one? accept a pattern argument.

  • Top-level constant look-up is no longer available.

  • One of our most loved libraries, pp.rb, is now automatically loaded. You no longer have to write require pp.

  • Print backtrace and error message in reverse order (oldest call first, most recent call last). When a long backtrace appears on your terminal (TTY), you can easily find the cause line at the bottom of the backtrace. Note that the order is reversed only when the backtrace is printed out to the terminal directly.

The source level compatibility with previous versions of Ruby should be preserved. Nevertheless, user specific Ruby binary extensions need to be rebuild.

See the upstream release notes for more information about Ruby 2.5.