Ruby 3.4.0 preview2 Released

submited by
Style Pass
2024-10-07 16:30:07

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]

Keyword splatting nil when calling methods is now supported. **nil is treated similarly to **{}, passing no keywords, and not calling any conversion methods. [Bug #20064]

New: test.rb:1:in ‘Object#foo’: undefined method ‘time’ for an instance of Integer from test.rb:2:in <main>' ``

Redefining some core methods that are specially optimized by the interpeter and JIT like String.freeze or Integer#+ now emits a performance class warning (-W:performance or Warning[:performance] = true). [Feature #20429]

Ruby was first developed by Matz (Yukihiro Matsumoto) in 1993, and is now developed as Open Source. It runs on multiple platforms and is used all over the world especially for web development.

Leave a Comment