Ruby Box is an experimental feature that provides separate spaces in a Ruby process to isolate application code, libraries, and monkey patches. Credit: Finesell/Shutterstock Ruby 4.0.0 has arrived as the newest release of the interpreted, object-oriented Ruby programming language. The update features a new just-in-time compiler, ZJIT, and an experimental “Ruby Box” capability for in-process separation of classes and modules. Released on December 25, 2025, Ruby 4.0.0 can be downloaded from ruby-lang,org. Ruby Box is a new feature designed to provide separate spaces in a Ruby process for isolating code, libraries, and monkey code. Anticipated use cases for Ruby Box include running test cases in a box to protect other tests when the test case uses monkey patches for overriding something, running web app boxes in parallel for blue-green deployments on an app server in a Ruby process, and running web app boxes in parallel to evaluate dependency updates for a specific time period by checking response diffs. Note that Ruby Box is currently experimental and comes with a few known issues. Ruby 4.0.0 also introduces ZJIT, a new just-in-time compiler intended to be the next generation of YJIT. Built into Ruby’s YARV reference implementation, ZJIT is faster than the interpreter, but not yet as fast as YJIT. Developers are encouraged to experiment with ZJIT, but maybe hold off on deploying it in production for now. Users are advised to stay tuned for Ruby 4.1 ZJIT. Also in Ruby 4.0.0, Ruby’s parallel execution mechanism, Ractor, has received improvements including a new class, Ractor:port, to address issues pertaining to message sending and receiving, and Ractor.shareable_proc, to make it easier to share Proc objects between Ractors. For performance, many internal data structures in Ractor have been improved to reduce contention on a global lock, thus resulting in better parallelism. Ractors now also share less internal data, resulting in less CPU contention when running in parallel. Ruby first emerged in 1995. Other features in Ruby 4.0.0 include the following: *nil no longer calls nil.to_a, similar to how **nil does not call nil.to_hash. For core classes, Array#rfind has been added as a more efficient alternative to array.reverse_each.find. Enumerator.produce now accepts an optional size keyword argument to specify the enumerator size. Kernel#inspect now checks for the existence of an #instance_variables_to_inspect method, allowing control over which instance variables are displayed in the #inspect string. Programming LanguagesRubySoftware Development