Ruby 4.0.0 Released
ruby-lang.org·2d·
🔬Miri
Preview
Report Post

Posted by naruse on 25 Dec 2025

We are pleased to announce the release of Ruby 4.0.0. Ruby 4.0 introduces “Ruby Box” and “ZJIT”, and adds many improvements.

Ruby Box

Ruby Box is a new (experimental) feature to provide separation about definitions. Ruby Box is enabled when an environment variable RUBY_BOX=1 is specified. The class is Ruby::Box.

Definitions loaded in a box are isolated in the box. Ruby Box can isolate/separate monkey patches, changes of global/class variables, class/module definitions, and loaded native/ruby libraries from other boxes.

Expected use cases are:

  • Run test cases in box to protect other tests when the test case uses monkey patches to override something
  • Run web app boxes in parallel to execute blue-green deployment on an app server …

Similar Posts

Loading similar posts...