Ruby 3.4.0 rc1 Released

submited by
Style Pass
2024-12-12 15:30:02

Alternative garbage collector (GC) implementations can be loaded dynamically through the modular garbage collector feature. To enable this feature, configure Ruby with --with-modular-gc at build time. GC libraries can be loaded at runtime using the environment variable RUBY_GC_LIBRARY. [Feature #20351]

Ruby’s built-in garbage collector has been split into a separate file at gc/default/default.c and interacts with Ruby using an API defined in gc/gc_impl.h. The built-in garbage collector can now also be built as a library using make modular-gc MODULAR_GC=default and enabled using the environment variable RUBY_GC_LIBRARY=default. [Feature #20470]

An experimental GC library is provided based on MMTk. This GC library can be built using make modular-gc MODULAR_GC=mmtk and enabled using the environment variable RUBY_GC_LIBRARY=mmtk. This requires the Rust toolchain on the build machine. [Feature #20860]

String literals in files without a frozen_string_literal comment now behave as if they were frozen. If they are mutated a deprecation warning is emitted. These warnings can be enabled with -W:deprecated or by setting Warning[:deprecated] = true. To disable this change, you can run Ruby with the --disable-frozen-string-literal command line argument. [Feature #20205]

Leave a Comment