Ruby 3.0 RC1 Is Out

Ruby 3.0.0 RC1 brings a bunch of new features and enhancements like RBS, TypeProf, Ractor, and Fiber Scheduler.

The first release candidate of Ruby 3.0.0 is now available. Ruby 3.0.0 RC1 brings a bunch of new features like RBS, TypeProf, Ractor, and Fiber Scheduler.

Well, RBS is a language to define the types of Ruby programs. Type checkers including TypeProf and other tools supporting RBS understand Ruby codes much better with RBS definitions.

RBS is aimed at supporting commonly seen patterns in Ruby programs and it enables writing advanced types including union types, method overloading, and generics. RBS also supports duck typing with interface types.

Source: Ruby

TypeProf is a type analysis tool bundled in the Ruby package. Currently, It serves as a kind of type inference. TypeProf reads plain Ruby code, then it analyzes what methods are defined and how they are being used, and creates a prototype of type signature in RBS format.

The latest release also features Ractor(experimental). Well, Ractor is an Actor-model like concurrent abstraction developed to offer a parallel execution feature without thread-safety concerns. Users can create multiple ractors and run them in parallel. Ractors do not share normal objects. Communication between ractors are supported by message passing.

To help you in intercepting blocking operations RC1 is introducing Fiber#scheduler. Fiber#scheduler allows for light-weight concurrency without changing existing code.

To see the complete list of new features you can visit the official announcement here.



Next Recommended Reading Ruby on Rails Section Announced