Everything you need to know about Ruby 4.0

This title could be clearer and more informative.Try out Clickbait Shieldfor free (5 uses left this month).

Ruby 4.0 was released on December 25, 2025, marking the language's 30th anniversary. The upgrade is relatively painless with mostly backwards-compatible changes. Key features include Ruby::Box for isolated namespaces within processes, ZJIT as a new method-based JIT compiler alongside YJIT, improvements to Ractors with a new Ractor::Port API, changes to nil splatting behavior, and the ability to start lines with logical operators. Set and Pathname are now built-in core classes, and Array gains new methods like rfind. The article provides a step-by-step upgrade guide covering release notes review, deprecation warnings, testing, bundler updates, and version switching.

8m read timeFrom honeybadger.io
Post cover image
Table of contents
What is Ruby::Box?Why ZJIT mattersRuby 4 has some improvements to Ractors*.nil changes in Ruby 4Logical operators at the beginning of a line in Ruby 4Some class updates in Ruby 4How to upgrade to Ruby 4

Sort: