Ruby 2.5 is the latest stable version of Ruby. Many new features and improvements are included for the increasingly diverse and expanding demands for Ruby. With this major update from Ruby 2.4 in Fedora 26 to Ruby 2.5 in Fedora 28, Fedora becomes the superior Ruby development platform.
ensureare now allowed to be used directly with
yield_selfto 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.
Struct.newcan create classes that accept keyword arguments.
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
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.