Skip to content
Menu
Open World News Open World News
  • Privacy Policy
Open World News Open World News

Ruby 3.4.0 preview2 Released

Posted on October 8, 2024 by Michael G

Author:
Source

We are pleased to announce the release of Ruby 3.4.0-preview2.

Prism

Switch the default parser from parse.y to Prism. [Feature #20564]

Language changes

  • String literals in files without a frozen_string_literal comment now emit a deprecation warning
    when they are mutated.
    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]

  • it is added to reference a block parameter. [Feature #18980]

  • 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]

  • Block passing is no longer allowed in index. [Bug #19918]

  • Keyword arguments are no longer allowed in index. [Bug #20218]

Core classes updates

Note: We’re only listing outstanding class updates.

  • Exception

    • Exception#set_backtrace now accepts an array of Thread::Backtrace::Location.
      Kernel#raise, Thread#raise and Fiber#raise also accept this new format. [Feature #13557]
  • Range

    • Range#size now raises TypeError if the range is not iterable. [Misc #18984]

Compatibility issues

Note: Excluding feature bug fixes.

  • Error messages and backtrace displays have been changed.
    • Use a single quote instead of a backtick as a opening quote. [Feature #16495]
    • Display a class name before a method name (only when the class has a permanent name). [Feature #19117]
    • Kernel#caller, Thread::Backtrace::Location’s methods, etc. are also changed accordingly.
    Old:
    test.rb:1:in `foo': undefined method `time' for an instance of Integer
            from test.rb:2:in `<main>'
    
    New:
    test.rb:1:in 'Object#foo': undefined method 'time' for an instance of Integer
            from test.rb:2:in `<main>'
    
  • Hash#inspect rendering has changed. [Bug #20433]
    • Symbol keys are displayed using the modern symbol key syntax: "{user: 1}"
    • Other keys now have spaces around =>: '{"user" => 1}', while previously they didn’t: '{"user"=>1}'

C API updates

  • rb_newobj and rb_newobj_of (and corresponding macros RB_NEWOBJ, RB_NEWOBJ_OF, NEWOBJ, NEWOBJ_OF) have been removed. [Feature #20265]
  • Removed deprecated function rb_gc_force_recycle. [Feature #18290]

Implementation improvements

  • Array#each is rewritten in Ruby for better performance [Feature #20182].

Miscellaneous changes

  • Passing a block to a method which doesn’t use the passed block will show
    a warning on verbose mode (-w).
    [Feature #15554]

  • 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]

See GitHub releases like Logger or
changelog for details of the default gems or bundled gems.

See NEWS
or commit logs
for more details.

With those changes, 4422 files changed, 163889 insertions(+), 243380 deletions(-)
since Ruby 3.3.0!

Download

  • https://cache.ruby-lang.org/pub/ruby/3.4/ruby-3.4.0-preview2.tar.gz

    SIZE: 22722332
    SHA1: c23265acf6c07b4c1df1e41eebf8b4cf2f25b97b
    SHA256: 443cd7ec54ade4786bc974ce9f5d49f172a60f8edc84b597b7fe2bd2a94b8371
    SHA512: 0946d256587597bdf13437a50f7a3298c151133edea161a1c4806a04dcbd8c2e8a7fd617f3eda16c5c05f6e6346317562cc30ba67698f1fdd92237c03bdbd23e
    
  • https://cache.ruby-lang.org/pub/ruby/3.4/ruby-3.4.0-preview2.tar.xz

    SIZE: 16878876
    SHA1: dbff404b969012702dc500cac72f4d6b3822068e
    SHA256: 626bf4fe952323c15ec9a8999f470ec136ef91c0fc34c484646aaaa9a0b62ca7
    SHA512: f23257896a35d3a581cbf5e8c94fe28e45725e39608a7669f47f31085338b1b4929a4db40d826d8fee628afb97b0c25b2f9e7bda4cd42e80c1208c46caf54265
    
  • https://cache.ruby-lang.org/pub/ruby/3.4/ruby-3.4.0-preview2.zip

    SIZE: 28101194
    SHA1: 479bd223bca3225fb3a15984e3eae4efb9a40189
    SHA256: e00a6fbf6f9e25a725711a8aac7e38be6bed61de4db9862a405172b96bf38b5b
    SHA512: 0d9ee1c41920e4d594b0f2c40d02339b4e9a2cd5232f5ee914cab5a685cb4a2279fbbfd8fbad40ef0a53866db4e1de96068c62580ede6d8fab02550393bcbe81
    

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 all over the world especially for web development.

Posted by naruse on 7 Oct 2024

Read more

Related Posts:

  • Mario Hernandez: Integrating Drupal with Storybook components
    Mario Hernandez: Integrating Drupal with Storybook…
  • Favor your repository
    Favor your repository
  • Relatively good news
    Relatively good news
  • Ruby 3.2.0 Released
    Ruby 3.2.0 Released
  • Calculated releases scheduled
    Calculated releases scheduled
  • Mario Hernandez: Migrating your Drupal theme from Patternlab to Storybook
    Mario Hernandez: Migrating your Drupal theme from…

Recent Posts

  • [TUT] LoRa & LoRaWAN – MikroTik wAP LR8 kit mit The Things Network verbinden [4K | DE]
  • Mercado aguarda Powell e olha Trump, dados e Haddad | MINUTO TOURO DE OURO – 11/02/25
  • Dan Levy Gets Candid About Learning How To Act Differently After Schitt’s Creek: ‘It’s Physically…
  • Building a Rock Shelter & Overnight Stay in Heavy Snow 🏕️⛰️
  • Les milliardaires Elon Musk et Xavier Niel s’insultent copieusement

Categories

  • Android
  • Linux
  • News
  • Open Source
©2025 Open World News | Powered by Superb Themes
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.
Cookie SettingsAccept All
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT