# Ruby: what changed from 3 to 4 - Product: Ruby (https://whatsnew.fyi/product/ruby) - Vendor: Ruby - Range: changelog entries numbered after 3.4.10 up to and including 4.0.6, stable releases only - Entries below: 4 releases (newest first) - Resolved: 3 is 3.4.10 and 4 is 4.0.6, the newest stable release of each major we track - Carrying security changes: 2 · CVEs mentioned: 2 · Mentioning breaking changes: 0 · Removing or deprecating something: 0 - Page: https://whatsnew.fyi/product/ruby/compare/3...4 What's New is an index, not a publisher: every entry below links to the vendor's own release notes, which are the authoritative source. Entries are labelled where they are hand-curated sample data, pre-releases, or drawn from a secondary source such as a developer blog. Reuse: the summaries, labels and curation here are © What's New. Quote freely with attribution and a link back; wholesale republication of the corpus is not permitted — terms: https://whatsnew.fyi/terms. The vendors' own release notes remain their publishers'. ## What changed (3 changes, grouped by kind) ### Fixed #### 4.0.5 (2026-05-20) - Fix build system regression from Ruby 4.0.4 ### Security #### 4.0.5 (2026-05-20) - Fix use-after-free in pthread-based getaddrinfo timeout handler (CVE-2026-46727) #### 4.0.3 (2026-04-21) - Fix CVE-2026-41316 in ERB 6.0.1.1 _2 releases carry no categorized changes yet: 4.0.6, 4.0.4._ ## Release notes ### 4.0.6 — Ruby 4.0.6 Released - Date: 2026-07-14 - Version: 4.0.6 - Original notes: https://www.ruby-lang.org/en/news/2026/07/14/ruby-4-0-6-released/ - Permalink: https://whatsnew.fyi/product/ruby/releases/4.0.6 Ruby 4.0.6 has been released. This is a routine update that includes bugfixes. Please see the GitHub releases for further details. Release Schedule We intend to release the latest stable Ruby version… ### 4.0.5 — Ruby 4.0.5 Released - Date: 2026-05-20 - Version: 4.0.5 - Original notes: https://www.ruby-lang.org/en/news/2026/05/20/ruby-4-0-5-released/ - Permalink: https://whatsnew.fyi/product/ruby/releases/4.0.5 Ruby 4.0.5 has been released. This release only contains a security fix for CVE-2026-46727: Use-after-free in pthread-based getaddrinfo timeout handler and a build system regression in Ruby 4.0.4 unde… - **security** — Fix use-after-free in pthread-based getaddrinfo timeout handler (CVE-2026-46727) - **fixed** — Fix build system regression from Ruby 4.0.4 ### 4.0.4 — Ruby 4.0.4 Released - Date: 2026-05-11 - Version: 4.0.4 - Original notes: https://www.ruby-lang.org/en/news/2026/05/11/ruby-4-0-4-released/ - Permalink: https://whatsnew.fyi/product/ruby/releases/4.0.4 Ruby 4.0.4 has been released. This is a routine update that includes bugfixes. Please see the GitHub Releases for further details. Release Schedule We intend to release the latest stable Ruby version… ### 4.0.3 — Ruby 4.0.3 Released - Date: 2026-04-21 - Version: 4.0.3 - Original notes: https://www.ruby-lang.org/en/news/2026/04/21/ruby-4-0-3-released/ - Permalink: https://whatsnew.fyi/product/ruby/releases/4.0.3 Ruby 4.0.3 has been released. This release only contains ERB 6.0.1.1, which fixes CVE-2026-41316 . If your application calls Marshal.load on untrusted data AND has both erb and activesupport loaded, p… - **security** — Fix CVE-2026-41316 in ERB 6.0.1.1