TL;DR
Ruby 4.0.0 was released on December 25, 2025, introducing an experimental isolation feature called Ruby Box and a new JIT compiler, ZJIT. The release also brings multiple language and core-class changes and a set of improvements to Ractor, Ruby's parallel-execution facility.
What happened
The Ruby core team published Ruby 4.0.0 on December 25, 2025. The release debuts Ruby Box, an experimental mechanism for separating definitions and isolating changes — activated by setting RUBY_BOX=1 and exposed via the Ruby::Box class. Ruby Box can contain monkey patches, global/class-variable changes, class and module definitions, and libraries inside isolated execution contexts. Ruby 4.0 also presents ZJIT, a new just-in-time compiler developed as a successor to YJIT; building with ZJIT support requires Rust 1.85.0 or later and the compiler is enabled with the –zjit option. The team says ZJIT outperforms the interpreter but does not yet match YJIT, and they recommend experimentation while advising caution about production deployment. Ractor gains features such as Ractor::Port and shareable Proc objects, plus internal changes to reduce global lock contention. The release bundles a range of language, core-class and stdlib adjustments and bug fixes.
Why it matters
- Ruby Box provides a way to isolate code and runtime changes, which can help test isolation, parallel app hosting, and safer experimentation with dependencies.
- ZJIT represents a new compiler architecture aimed at raising Ruby's performance ceiling and attracting contributors, signaling continued investment in runtime speed.
- Improvements to Ractor and internal contention reductions aim to make parallel Ruby programs more efficient and reliable.
- Promotion of commonly used libraries (Pathname, Set) into core and updates across core classes reduce friction and modernize the standard environment.
Key facts
- Release date: December 25, 2025.
- Ruby Box is experimental, enabled by RUBY_BOX=1 and exposed as Ruby::Box; it isolates definitions, patches, globals and loaded libraries.
- ZJIT is a new JIT compiler developed as the next generation of YJIT; it requires Rust 1.85.0 or newer to build and is enabled with –zjit.
- Project guidance: ZJIT is faster than the interpreter but currently not as fast as YJIT; the team recommends experimentation rather than immediate production use.
- Ractor improvements include a new Ractor::Port synchronization primitive, Ractor.shareable_proc and shareable_lambda, reduced global lock contention, and less shared internal data to lower cache contention.
- Pathname and Set were promoted to core classes (no longer autoloaded stdlib).
- Several core and library APIs changed or were added: Array#rfind and Array#find, Enumerator.produce size option, ErrorHighlight shows caller/callee snippets for ArgumentError, and Unicode was updated to 17.0.0.
- IO and socket changes: IO.select accepts Float::INFINITY; TCPSocket now accepts open_timeout and IO::TimeoutError is consistently raised for user-specified timeouts in many cases.
- Fiber and Thread received new raise(cause:) support; Fiber::Scheduler gained hooks for interrupts, yielding and IO close/write behavior.
What to watch next
- Performance trajectory of ZJIT across upcoming releases, including expectations around Ruby 4.1 which the team referenced for ZJIT improvements.
- Adoption and tooling around Ruby Box: whether higher-level package or sandboxing APIs are built on top of the low-level box facility.
- Progress on Ractor's status change: the project aims to remove the "experimental" label next year and that transition will affect parallel-programming guarantees and ecosystem adoption.
Quick glossary
- Ruby Box: An experimental isolation feature in Ruby 4 that lets code run in a contained environment, isolating definitions, patches and loaded libraries from other boxes.
- JIT (Just-In-Time) compiler: A runtime component that compiles parts of a program into native code during execution to improve performance.
- Ractor: Ruby's parallel-execution abstraction designed to reduce shared mutable state and help write concurrent programs.
- Standard library (stdlib): A collection of libraries bundled with the language distribution that provide common utilities and APIs.
- SSA IR: Static Single Assignment Intermediate Representation — a compiler IR form used to enable optimizations and simpler analysis in ahead-of-time or JIT compilers.
Reader FAQ
How do I enable Ruby Box?
Set the environment variable RUBY_BOX=1; the feature is exposed via the Ruby::Box class.
Is ZJIT ready for production use?
The release notes say ZJIT is faster than the interpreter but not yet as fast as YJIT, and they recommend experimentation while advising against immediate production deployment.
Do I need Rust to build Ruby?
You need Rust 1.85.0 or newer only if you want to build Ruby with ZJIT support.
Has Ractor lost its experimental label?
The maintainers aim to remove Ractor's experimental status next year, but it remained experimental in this release.

Ruby 4.0.0 Released 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…
Sources
Related posts
- New Low-Cost Mainboard Project Aims to Revive Next‑Gen Amiga Hardware
- Asterisk AI Voice Agent: Open-source AI Voice Agent for Asterisk/FreePBX
- Microsoft please get your tab to autocomplete shit together — developer complaint