What Is New In Ruby 4.0
blog.saeloun.com·2w
Rust Compiler Internals
Preview
Report Post

Ruby 4.0 is here, releasing on Christmas Day 2025, marking 30 years since Ruby’s first public release. This release packs some genuinely exciting features.

Let’s explore the most impactful changes in Ruby 4.0.

ZJIT - A New JIT Compiler

Ruby 4.0 introduces ZJIT, a new just in time compiler built by the same team behind YJIT. Unlike YJIT’s lazy basic block versioning approach, ZJIT uses a more traditional method based compilation strategy.

The key difference? ZJIT is designed to be more accessible to contributors. It follows a “textbook” compiler architecture that’s easier to understand and modify.

To enable ZJIT, we can use the --zjit flag:

ruby --zjit my_script.rb

While ZJIT is faster than interpreted code, YJIT remains the recommended choice for production...

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help