On Christmas Day, Ruby 4.0.0 was unveiled, featuring significant updates including the experimental isolation tool, Ruby Box, and the new just-in-time compiler, ZJIT. Ruby Box introduces a strict separation of definitions within its environment, addressing complex dependency issues and rogue modifications that can affect global settings.
This innovative feature allows developers to run test cases with monkey patches without the risk of those changes impacting other tests. Furthermore, it can serve as a basis for blue-green deployment strategies, enabling parallel instances of web applications in a single Ruby process.
Meanwhile, ZJIT aims to enhance Ruby's performance with improved compilation techniques, although it is still in the experimental phase. Currently, it shows speed advantages over the standard interpreter but hasn't reached the efficiency of the previous YJIT. Developers with Rust 1.85.0 or newer can experiment with it, while stability enhancements for Ractor are also included, aiming for official support in the coming year.