Ruby 4.0 releases on Christmas Day 2025, marking 30 years of Ruby. Major additions include ZJIT, a new JIT compiler designed for easier community contributions; Ruby::Box for isolated namespaces enabling multiple library versions; redesigned Ractor API using Ractor::Port for parallelism; Set and Pathname promoted to core classes; enhanced source_location methods returning 5 elements; String#strip with selectors; new Math methods for precise calculations; and various quality-of-life improvements like logical operators on new lines and instance_variables_to_inspect for cleaner debugging.
Table of contents
ZJIT - A New JIT CompilerRuby::Box - Isolated NamespacesRedesigned Ractor APILogical Operators on Next Lineinstance_variables_to_inspectSet Is Now a Core ClassPathname Promoted to CoreExtended source_locationString#strip with SelectorsNew Math MethodsOther Notable ChangesWrapping UpSort: