Ruby 4.0.0 preview2 Released

We are pleased to announce the release of Ruby 4.0.0-preview2. Ruby 4.0 updates its Unicode version to 17.0.0, etc.

language changes

  • *nil doesn’t call anymore nil.to_asimilar to how **nil doesn’t call nil.to_hash, [[Feature #21047],

core class update

Note: We are only listing notable updates to the core classes.

  • binding

    • Binding#local_variables It no longer includes numbered parameters. Too, Binding#local_variable_get And Binding#local_variable_set Refuse to handle serialized 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 to version 17.0. [[Feature #19908],[[Feature #20724],[[Feature #21275]](also applies to Regexp)

standard library update

Note: We are only listing notable updates to the standard libraries.

  • ostructure 0.6.1
  • pstore 0.2.0
  • benchmark 0.4.0
  • Logger 1.7.0
  • Rdock 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: Excludes feature bug fixes.

Standard Library Compatibility Issues

c api update

Victory

  • YJIT
    • YJIT statistics
      • ratio_in_yjit No longer works in default builds. Use --enable-yjit=stats But configure to turn it on --yjit-stats,
      • Add invalidate_everything For default statistics, which increases when each code is invalidated by tracepoint.
    • Add mem_size: And call_threshold: choice of RubyVM::YJIT.enable,
  • ZJIT
    • Add an experimental method-based JIT compiler. Use --enable-zjit But configure to enable --zjit Help.
    • As of ruby ​​4.0.0-preview2, ZJIT is not yet ready to speed up most benchmarks. Please avoid evaluating ZJIT for now. 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/rgit repository.

miscellaneous changes

See news or log for more details.

With those changes, 3607 files changed since Ruby 3.4.0, 197451 insertions(+), 285607 deletions(-)!

download

  • https://cache.ruby-lang.org/pub/ruby/4.0/ruby-4.0.0-preview2.tar.gz

    SIZE: 23444451
    SHA1: 132e450bbee3f61ed0b463ed1e2bd3a3a324339c
    SHA256: 0a3330dae710302e11f7f0323e83219ab3c6517984691a312c662f329c5120e1
    SHA512: b5e681cc84be59148485b9a2212dcf54d61cfee27431ceddb49bedc8baa913ec8b36da43242cb4f1791b25e4bfc1dcf72b5527288a0656f2933da898d0e0b40f
    
  • https://cache.ruby-lang.org/pub/ruby/4.0/ruby-4.0.0-preview2.tar.xz

    SIZE: 17554228
    SHA1: f8e8b98ea85ac82610ab601a21dc9a90c5c56a97
    SHA256: 0b92b15466d77a9d7e59e4a75f050d42cd50fe96c951d2b3b9f8029394cd9a43
    SHA512: 7afaa8d8e832ef0ded28f1caf874da69f16105e1b3aad5947c6911364159b4c6ebd3d7ea5d7d86708e9f2f06a047921b8302ca6e75ec429a3da846845f896976
    
  • https://cache.ruby-lang.org/pub/ruby/4.0/ruby-4.0.0-preview2.zip

    SIZE: 28933540
    SHA1: 48a235cfbfd4252dce81da870c792e32309e62b9
    SHA256: f5c68ee44dfcb76b61c07c437fa945814dfc516570b1c921506ac886960160ca
    SHA512: 508c685e46a641c74e2968daf650559503ce2bcaac3403654713adb2345c3ede2bace929294a1367afecac5edd6b2c42fa833f5313456f78c79151d310c860cf
    

What is ruby?

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 worldwide especially for web development.



Leave a Comment