Here are some highlights:
- rescue/else/ensure are allowed inside do/end blocks.
- 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.
- Struct.new can create classes that accept keyword arguments.
- Top-level constant look-up is no longer available.
- About 5-10% performance improvement by removing all trace instructions from overall bytecode (instruction sequences).
- Block passing by a block parameter is about 3 times faster than Ruby 2.4.
- Mutex is rewritten to be smaller and faster.
- ERB now generates code from a template twice as fast as Ruby 2.4.
Do you want to try these new features? Deploy the Bitnami Ruby Stack in just one click. To get started, you can choose to use our free all-in-one native installers, virtual machines, or launch it in the cloud.