Ruby 4.0.0 Preview2 Released

https://news.ycombinator.com/rss Hits: 7
Summary

Posted by naruse on 17 Nov 2025 We are pleased to announce the release of Ruby 4.0.0-preview2. Ruby 4.0 updates its Unicode version to 17,0.0, and so on. Language changes *nil no longer calls nil.to_a, similar to how **nil does not call nil.to_hash. [[Feature #21047]] Core classes updates Note: We鈥檙e only listing notable updates of Core class. Binding Binding#local_variables does no longer include numbered parameters. Also, Binding#local_variable_get and Binding#local_variable_set reject to handle numbered parameters. [[Bug #21049]] IO IO.select accepts +Float::INFINITY+ as a timeout argument. [[Feature #20610]] String Update Unicode to Version 17.0.0 and Emoji Version 17.0. [[Feature #19908]][[Feature #20724]][[Feature #21275]] (also applies to Regexp) Standard Library updates Note: We鈥檙e only listing notable updates of Standard librarires. ostruct 0.6.1 pstore 0.2.0 benchmark 0.4.0 logger 1.7.0 rdoc 6.13.1 win32ole 1.9.2 irb 1.15.2 reline 0.6.1 readline 0.0.4 fiddle 1.1.6 Compatibility issues Note: Excluding feature bug fixes. Standard library compatibility issues C API updates JIT YJIT YJIT stats ratio_in_yjit no longer works in the default build. Use --enable-yjit=stats on configure to enable it on --yjit-stats. Add invalidate_everything to default stats, which is incremented when every code is invalidated by TracePoint. Add mem_size: and call_threshold: options to RubyVM::YJIT.enable. ZJIT Add an experimental method-based JIT compiler. Use --enable-zjit on configure to enable the --zjit support. As of Ruby 4.0.0-preview2, ZJIT is not yet ready for speeding up most benchmarks. Please refrain from evaluating ZJIT just yet. Stay tuned for the Ruby 4.0 release. RJIT --rjit is removed. We will move the implementation of the third-party JIT API to the ruby/rjit repository. Miscellaneous changes See NEWS or commit logs for more details. With those changes, 3607 files changed, 197451 insertions(+), 285607 deletions(-) since Ruby 3.4.0! Download https://cache.ruby-lang....

First seen: 2025-11-18 13:50

Last seen: 2025-11-18 19:51