<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Asistensia</title>
    <description>The latest articles on DEV Community by Asistensia (@asistensia).</description>
    <link>https://dev.to/asistensia</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4257272%2F64da6513-d9cb-43b5-bc17-d2f5bdc4ee7f.png</url>
      <title>DEV Community: Asistensia</title>
      <link>https://dev.to/asistensia</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/asistensia"/>
    <language>en</language>
    <item>
      <title>What's New in Ruby 4.0: Features &amp; Upgrade Guide</title>
      <dc:creator>Asistensia</dc:creator>
      <pubDate>Sat, 21 Nov 2026 12:12:18 +0000</pubDate>
      <link>https://dev.to/asistensia/whats-new-in-ruby-40-features-upgrade-guide-34pb</link>
      <guid>https://dev.to/asistensia/whats-new-in-ruby-40-features-upgrade-guide-34pb</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Ruby turned 30 in December 2025, and the core team marked it with &lt;strong&gt;Ruby 4.0&lt;/strong&gt;, released on Christmas Day as usual. The big version number is partly a celebration—there is no wave of breaking syntax—but there is plenty under the hood: &lt;strong&gt;Ruby Box&lt;/strong&gt;, a new JIT called &lt;strong&gt;ZJIT&lt;/strong&gt;, a reworked &lt;strong&gt;Ractor&lt;/strong&gt; API, and a long list of quality-of-life improvements. In this guide, the &lt;a href="https://asistensia.com/" rel="noopener noreferrer"&gt;Asistensia&lt;/a&gt; team—Ruby on Rails consultants who upgrade production apps for a living—explains what is new in Ruby 4.0, what can break, and how to upgrade safely.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ruby 4.0 at a Glance
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Released:&lt;/strong&gt; December 25, 2025 (Ruby's 30th anniversary)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Headline features:&lt;/strong&gt; Ruby Box, ZJIT, Ractor::Port&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Built into core:&lt;/strong&gt; Set and Pathname&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bundled tooling:&lt;/strong&gt; RubyGems and Bundler 4&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Official notes:&lt;/strong&gt; &lt;a href="https://www.ruby-lang.org/en/news/2025/12/25/ruby-4-0-0-released/" rel="noopener noreferrer"&gt;Ruby 4.0.0 release announcement&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why Ruby 4.0 Matters
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Faster object creation and a leaner GC with no code changes&lt;/li&gt;
&lt;li&gt;New building blocks for isolation and parallelism (Ruby Box, Ractor::Port)&lt;/li&gt;
&lt;li&gt;Cleaner core APIs: &lt;code&gt;Set&lt;/code&gt; and &lt;code&gt;Pathname&lt;/code&gt; are now built in&lt;/li&gt;
&lt;li&gt;A handful of removals you should catch in CI before production does&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  1) Ruby Box: Isolated Definitions (Experimental)
&lt;/h2&gt;

&lt;p&gt;Ruby Box isolates definitions from each other. Monkey patches, global and class variable changes, class and module definitions, and loaded libraries (Ruby or native) stay inside their own box. It is enabled with an environment variable and exposed as &lt;code&gt;Ruby::Box&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;RUBY_BOX&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1 ruby app.rb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Where it could help:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Running tests in isolation so monkey patches do not leak between them&lt;/li&gt;
&lt;li&gt;Running two versions of an app side by side in one process (blue/green style)&lt;/li&gt;
&lt;li&gt;Comparing responses before and after a dependency upgrade&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is experimental—great to explore, not something to depend on yet.&lt;/p&gt;

&lt;h2&gt;
  
  
  2) ZJIT: Ruby's Next-Generation JIT Compiler
&lt;/h2&gt;

&lt;p&gt;ZJIT is a new method-based JIT compiler from the team behind YJIT. In 4.0 it is already faster than the interpreter but &lt;strong&gt;not yet as fast as YJIT&lt;/strong&gt;, and the core team does not recommend it for production. The goal is for it to overtake YJIT and become production-ready in Ruby 4.1.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ruby --zjit app.rb          &lt;span class="c"&gt;# enable at startup&lt;/span&gt;
&lt;span class="c"&gt;# or from Ruby code:&lt;/span&gt;
&lt;span class="c"&gt;# RubyVM::ZJIT.enable&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Building Ruby with ZJIT support requires Rust 1.85.0 or newer. For production today, &lt;strong&gt;stick with YJIT&lt;/strong&gt;—which also gained &lt;code&gt;mem_size:&lt;/code&gt; and &lt;code&gt;call_threshold:&lt;/code&gt; options on &lt;code&gt;RubyVM::YJIT.enable&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  3) Ractor::Port: Easier Parallel Ruby
&lt;/h2&gt;

&lt;p&gt;Ractors (Ruby's parallel actors) got a redesigned messaging model built on &lt;code&gt;Ractor::Port&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;port1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Ractor&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nc"&gt;Port&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;new&lt;/span&gt;
&lt;span class="n"&gt;port2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Ractor&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nc"&gt;Port&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;new&lt;/span&gt;

&lt;span class="nc"&gt;Ractor&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;new&lt;/span&gt; &lt;span class="n"&gt;port1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;port2&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;port1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;port2&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;
  &lt;span class="n"&gt;port1&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
  &lt;span class="n"&gt;port2&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;11&lt;/span&gt;
  &lt;span class="n"&gt;port1&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
  &lt;span class="n"&gt;port2&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;

&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;times&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nb"&gt;p&lt;/span&gt; &lt;span class="n"&gt;port1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;receive&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="c1"&gt;#=&amp;gt; 1, 2&lt;/span&gt;
&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;times&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nb"&gt;p&lt;/span&gt; &lt;span class="n"&gt;port2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;receive&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="c1"&gt;#=&amp;gt; 11, 12&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Added:&lt;/strong&gt; &lt;code&gt;Ractor#join&lt;/code&gt;, &lt;code&gt;Ractor#value&lt;/code&gt; (like Thread), and &lt;code&gt;Ractor.shareable_proc&lt;/code&gt; / &lt;code&gt;Ractor.shareable_lambda&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Removed:&lt;/strong&gt; &lt;code&gt;Ractor.yield&lt;/code&gt;, &lt;code&gt;Ractor#take&lt;/code&gt;, &lt;code&gt;Ractor#close_incoming&lt;/code&gt;, &lt;code&gt;Ractor#close_outgoing&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Lots of internal work on lock contention, plus deadlock and race fixes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The core team aims to drop the "experimental" label soon. If you experimented with the old API, expect to rewrite that code.&lt;/p&gt;

&lt;h2&gt;
  
  
  4) New Syntax in Ruby 4.0
&lt;/h2&gt;

&lt;p&gt;Lines can now &lt;strong&gt;start&lt;/strong&gt; with a logical operator (&lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt;, &lt;code&gt;||&lt;/code&gt;, &lt;code&gt;and&lt;/code&gt;, &lt;code&gt;or&lt;/code&gt;) and continue the previous line—just like leading-dot method chains:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;active?&lt;/span&gt;
   &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;verified?&lt;/span&gt;
   &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;banned?&lt;/span&gt;
  &lt;span class="n"&gt;grant_access&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And &lt;code&gt;*nil&lt;/code&gt; no longer calls &lt;code&gt;nil.to_a&lt;/code&gt;, matching how &lt;code&gt;**nil&lt;/code&gt; already behaves—optional splats are now cheap and clean:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;tags&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"news"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;optional_tags&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"ruby"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;  &lt;span class="c1"&gt;# optional_tags can be nil&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  5) Core Class Updates: Set, Pathname, Array#rfind
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Set is core:&lt;/strong&gt; no more &lt;code&gt;require "set"&lt;/code&gt;; &lt;code&gt;inspect&lt;/code&gt; now prints &lt;code&gt;Set[1, 2, 3]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pathname is core:&lt;/strong&gt; promoted from a default gem&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Array#rfind:&lt;/strong&gt; a faster alternative to &lt;code&gt;reverse_each.find&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Kernel#inspect:&lt;/strong&gt; define a private &lt;code&gt;instance_variables_to_inspect&lt;/code&gt; to hide noisy (or sensitive) ivars&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enumerator.produce&lt;/strong&gt; accepts a &lt;code&gt;size:&lt;/code&gt; keyword&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;String#strip&lt;/strong&gt; and friends accept character selectors; Unicode/Emoji updated to 17.0&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Math.log1p&lt;/strong&gt; and &lt;strong&gt;Math.expm1&lt;/strong&gt; added&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Socket.tcp&lt;/strong&gt; / &lt;strong&gt;TCPSocket.new&lt;/strong&gt; accept &lt;code&gt;open_timeout:&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ErrorHighlight&lt;/strong&gt; shows both the call site and the method definition for &lt;code&gt;ArgumentError&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Connection&lt;/span&gt;
  &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;initialize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;host&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;password&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="vi"&gt;@host&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="vi"&gt;@user&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="vi"&gt;@password&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;host&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;password&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;

  &lt;span class="kd"&gt;private&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;instance_variables_to_inspect&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="vi"&gt;@host&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="vi"&gt;@user&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;

&lt;span class="nc"&gt;Connection&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"db.local"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"app"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"s3cret"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;inspect&lt;/span&gt;
&lt;span class="c1"&gt;# =&amp;gt; #&amp;lt;Connection:0x... @host="db.local", @user="app"&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  6) Ruby 4.0 Performance Improvements
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Class#new&lt;/code&gt; is faster, especially with keyword arguments—great news for object-heavy Rails apps&lt;/li&gt;
&lt;li&gt;GC heaps grow independently per size pool, reducing memory use; faster sweeping for large objects&lt;/li&gt;
&lt;li&gt;Faster instance variable access on Strings, Arrays and other "generic ivar" objects&lt;/li&gt;
&lt;li&gt;Faster &lt;code&gt;object_id&lt;/code&gt; and &lt;code&gt;hash&lt;/code&gt; on classes and modules&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  7) Breaking Changes: What Can Break When Upgrading
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Gems moved to bundled:&lt;/strong&gt; &lt;code&gt;ostruct&lt;/code&gt;, &lt;code&gt;pstore&lt;/code&gt;, &lt;code&gt;benchmark&lt;/code&gt;, &lt;code&gt;logger&lt;/code&gt;, &lt;code&gt;rdoc&lt;/code&gt;, &lt;code&gt;irb&lt;/code&gt;, &lt;code&gt;reline&lt;/code&gt;, &lt;code&gt;readline&lt;/code&gt;, &lt;code&gt;fiddle&lt;/code&gt;, &lt;code&gt;win32ole&lt;/code&gt;—add them to your Gemfile if you use them under Bundler&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CGI&lt;/strong&gt; removed from default gems (except &lt;code&gt;cgi/escape&lt;/code&gt;); &lt;strong&gt;SortedSet&lt;/strong&gt; now needs the &lt;code&gt;sorted_set&lt;/code&gt; gem&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Net::HTTP&lt;/strong&gt; no longer adds &lt;code&gt;Content-Type: application/x-www-form-urlencoded&lt;/code&gt; automatically—set it explicitly where needed&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Kernel#open&lt;/code&gt; / &lt;code&gt;IO&lt;/code&gt; no longer spawn processes from a leading &lt;code&gt;|&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ObjectSpace._id2ref&lt;/code&gt; deprecated; &lt;code&gt;--rjit&lt;/code&gt; removed&lt;/li&gt;
&lt;li&gt;RubyGems and Bundler are now version 4&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Ruby 4.0 Upgrade Checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Run the test suite on Ruby 4.0 in CI with deprecation warnings on&lt;/li&gt;
&lt;li&gt;Add newly bundled gems (logger, ostruct, benchmark…) to the Gemfile&lt;/li&gt;
&lt;li&gt;Grep for &lt;code&gt;SortedSet&lt;/code&gt;, &lt;code&gt;require "cgi"&lt;/code&gt;, &lt;code&gt;Ractor.yield&lt;/code&gt;, and &lt;code&gt;open("|...")&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Check outbound &lt;code&gt;Net::HTTP&lt;/code&gt; POSTs for an explicit &lt;code&gt;Content-Type&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Update Docker base images and Bundler 4 lockfiles&lt;/li&gt;
&lt;li&gt;Keep YJIT on in production; try ZJIT in staging out of curiosity&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How Asistensia Helps You Upgrade to Ruby 4.0
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Asistensia&lt;/strong&gt; is a software consulting company specialising in Ruby on Rails, PHP/Laravel and DevOps. We take Ruby and Rails apps to the latest versions in small, reversible steps—without feature freezes or downtime.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Upgrade audit:&lt;/strong&gt; gem compatibility, deprecations and a risk-ranked plan&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hands-on upgrades:&lt;/strong&gt; Ruby 3.x → 4.0 and Rails 7 → 8, with CI and Docker images updated&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Performance tuning:&lt;/strong&gt; YJIT, GC and memory settings tuned for your workload (see our &lt;a href="https://asistensia.com/blog/rails-performance-audit" rel="noopener noreferrer"&gt;Rails performance audit&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ongoing support:&lt;/strong&gt; &lt;a href="https://asistensia.com/blog/ruby-on-rails-consulting" rel="noopener noreferrer"&gt;Ruby on Rails consulting&lt;/a&gt; and &lt;a href="https://asistensia.com/blog/devops-consulting" rel="noopener noreferrer"&gt;DevOps consulting&lt;/a&gt; for teams that need senior help&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://calendly.com/asistensia/30min" rel="noopener noreferrer"&gt;Book a free 30-minute consultation&lt;/a&gt; with Asistensia, or email &lt;a href="mailto:contact@asistensia.com"&gt;contact@asistensia.com&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ruby 4.0 FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  When was Ruby 4.0 released?
&lt;/h3&gt;

&lt;p&gt;Ruby 4.0.0 was released on December 25, 2025, shortly after Ruby's 30th anniversary. Patch releases (4.0.x) follow roughly every two months.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is Ruby 4.0 backward compatible with Ruby 3.4?
&lt;/h3&gt;

&lt;p&gt;Mostly, yes. Most apps only need Gemfile updates for gems that moved out of the default set (such as logger, ostruct and benchmark). Code using the old Ractor API, SortedSet, CGI or pipe-based &lt;code&gt;Kernel#open&lt;/code&gt; needs changes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Should I use ZJIT or YJIT in production?
&lt;/h3&gt;

&lt;p&gt;Use YJIT. ZJIT is experimental in Ruby 4.0 and not yet as fast as YJIT; the core team aims to make it production-ready in Ruby 4.1.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does Rails 8 work with Ruby 4.0?
&lt;/h3&gt;

&lt;p&gt;Yes—use the latest Rails 8.1 patch release, which includes fixes for Ruby 4.0 warnings, and check that your other gems support Ruby 4.0. Upgrade Ruby first, then Rails, as described in our &lt;a href="https://asistensia.com/blog/rails-upgrade" rel="noopener noreferrer"&gt;Rails 8 upgrade guide&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can Asistensia upgrade my app to Ruby 4.0?
&lt;/h3&gt;

&lt;p&gt;Yes. Asistensia offers Ruby and Rails upgrade audits and hands-on upgrades for teams worldwide. &lt;a href="https://asistensia.com/#contact" rel="noopener noreferrer"&gt;Get in touch&lt;/a&gt; to plan yours.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Ruby 4.0 is less about new syntax and more about laying foundations for the next decade: isolation with Ruby Box, a new JIT with ZJIT, and a Ractor API that is finally settling down. For most apps, the upgrade is a matter of tidying the Gemfile and picking up free performance. Planning a move to Ruby 4.0 or Rails 8? See our &lt;a href="https://asistensia.com/blog/rails-upgrade" rel="noopener noreferrer"&gt;Rails 8 upgrade guide&lt;/a&gt;—or &lt;a href="https://asistensia.com/#contact" rel="noopener noreferrer"&gt;contact Asistensia&lt;/a&gt; and we will help you ship it safely.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Written by Ahmad&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Ahmad Hassan, founder of &lt;a href="https://asistensia.com/" rel="noopener noreferrer"&gt;Asistensia&lt;/a&gt; and Senior Ruby on Rails expert with 10+ years of experience. He builds web and mobile applications using React, Next.js, and TypeScript, and contributes to backend development using Python and Ruby on Rails.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on the &lt;a href="https://asistensia.com/blog/whats-new-in-ruby-4" rel="noopener noreferrer"&gt;Asistensia blog&lt;/a&gt;.&lt;/em&gt; Asistensia is a software consultancy for Ruby on Rails, PHP/Laravel and DevOps. &lt;a href="https://calendly.com/asistensia/30min" rel="noopener noreferrer"&gt;Book a free 30-minute consultation&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>rails</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
