Skip to content
RubyInsights
Ruby 4.0 is released with Ruby Box, ZJIT, and performance advances

Ruby 4.0 is released with Ruby Box, ZJIT, and performance advances

Ruby 4.0.0 was released on December 25, 2025 and marked one of the most relevant updates to the language in recent years. The new version introduced Ruby Box, ZJIT, important performance improvements, advances in Ractor, and changes that directly affect developers building Ruby and Rails applications.

Share

The third week of Ruby Insights could have been dedicated to a central story for the entire ecosystem: the official release of Ruby 4.0.0, announced on December 25, 2025. The new version was not just an incremental update. It arrived with major additions, including Ruby Box, the new ZJIT, garbage collector improvements, advances in Ractor stability, and optimizations in critical parts of the runtime.

Among the highlights, the official announcement presents Ruby Box as an experimental feature for definition isolation. In practical terms, it makes it possible to separate monkey patches, changes to global and class variables, class and module definitions, and even loaded libraries across distinct contexts. This is particularly interesting for testing, blue-green deployment scenarios within the same process, and even dependency experimentation with lower risk of interference between contexts. For those who follow Ruby architecture and systems operation, this is a highly relevant technical move.

Another important point is ZJIT, introduced as part of Ruby 4’s performance evolution. Although the official announcement presents the feature in broader terms than deep implementation detail, it reinforces the direction of the core team to continue investing seriously in more efficient execution. The release also reports acceleration in Class#new, improvements in internal variable access, reduced GC overhead, and gains in operations related to object_id, hash, and object allocation. For Rails applications, this matters because runtime performance continues to have a direct effect on throughput, latency, and infrastructure cost.

The version also introduced language and compatibility changes that deserve attention from technical teams. Among them, *nil no longer calls nil.to_a, logical operators at the beginning of a line now continue the previous expression, and some older Ractor methods were removed because of the introduction of Ractor::Port. The release also marks the discontinuation of some legacy behaviors and the removal of previously deprecated APIs, signaling a gradual cleanup of the language in favor of a more coherent core.

In the standard ecosystem, Ruby 4.0 also updated or promoted several components, including rdoc 7.0.x, irb 1.16.0, reline 0.6.3, logger 1.7.0, and other relevant packages. This shows that the release is not limited to the interpreter itself: it also pushes the official tooling stack to a more current level. For Ruby and Rails developers, the real impact appears in the combination of language, tooling, documentation, and developer experience.

Ruby 4.0 is not just another major version. It materializes priorities that had already been building across the ecosystem: isolation, performance, concurrency maturity, and modernization of the standard environment. At a time when the market pressures languages and frameworks for efficiency and predictability, Ruby responded with a release that combines technical innovation with pragmatic evolution.

Sources

  • Ruby.org: official Ruby 4.0.0 release announcement.
  • Ruby.org: official December 2025 archive, providing context for the announcements of the period.

Comments

Sign in with Google or GitHub to comment.