Wiki - https://fedoraproject.org/wiki/Changes/Ruby_3.4 Discussion Thread - https://discussion.fedoraproject.org/t/f42-change-proposal-ruby-3-4-system-wide/138984 This is a proposed Change for Fedora Linux. This document represents a proposed Change. As part of the Changes process, proposals are publicly announced in order to receive community feedback. This proposal will only be implemented if approved by the Fedora Engineering Steering Committee. == Summary == Ruby 3.4 is the latest stable version of Ruby. Many new features and improvements are included for the increasingly diverse and expanding demands for Ruby. With this major update from Ruby 3.3 in Fedora 41 to Ruby 3.4 in Fedora 42, Fedora becomes the superior Ruby development platform. == Owner == * Name: [[User:vondruch| Vít Ondruch]] * Email: vondruch@xxxxxxxxxx * Name: [[User:mtasaka| Mamoru Tasaka]] * Email: mtasaka@xxxxxxxxxxxxxxxxx == Detailed Description == Ruby 3.4 is upstream's new major release of Ruby. Many new features and improvements are included. === Prism === Switch the default parser from parse.y to Prism to improve maintainability, error tolerance, portability, and performance. === Language changes === * String literals in files without a `frozen_string_literal` comment now emit a deprecation warning when they are mutated. * `it` is added to reference a block parameter. * Keyword splatting `nil` when calling methods is now supported.`**nil` is treated similarly to `**{}`, passing no keywords, and not calling any conversion methods. * Block passing is no longer allowed in index. * Keyword arguments are no longer allowed in index.#20218]] === Core classes 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. * Range ** `Range#size` now raises `TypeError` if the range is not iterable. === Compatibility issues === * Error messages and backtrace displays have been changed. ** Use a single quote instead of a backtick as a opening quote. ** Display a class name before a method name (only when the class has a permanent name). ** `Kernel#caller`, `Thread::Backtrace::Location`'s methods, etc. are also changed accordingly. * `Hash#inspect` rendering has changed. ** 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. * Removed deprecated function `rb_gc_force_recycle`. === Implementation improvements === * `Array#each` is rewritten in Ruby for better performance. === Miscellaneous changes === * Passing a block to a method which doesn't use the passed block will show a warning on verbose mode (`-w`). * 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`). == Feedback == == Benefit to Fedora == With a latest release, Ruby language is supporting the newest language features, which enables even faster and easier development of Ruby applications. == Scope == * Proposal owners: ** Finish packaging of Ruby 3.4. Current changes available in PR https://src.fedoraproject.org/rpms/ruby/pull-request/196 ** Rebuilding of Ruby packages providing native extensions (i.e. packages which depends on libruby). * Other developers: ** Rebuild of packages with binary extensions (i.e. packages which depends on libruby) will be handled automatically, but some packages might need fixes/updates to support Ruby 3.4 properly. * Release engineering: [https://pagure.io/releng/issue/12469 #12469] ** The packages are going to be rebuild in side-tag, but that does not need releng involvement nowadays. * Policies and guidelines: N/A (not needed for this Change) * Trademark approval: N/A (not needed for this Change) * Alignment with the Fedora Strategy: == Upgrade/compatibility impact == * User specific Ruby binary extensions need to be rebuild. * Adjustments to new language features will be needed. * Ruby packages/application dependencies might need to be adjusted if newly bundled gems are used. == Early Testing (Optional) == Do you require 'QA Blueprint' support? No == How To Test == == User Experience == The Ruby programs/scripts should behave as they were used to. == Dependencies == <pre> $ dnf repoquery --disablerepo=* --enablerepo=rawhide --enablerepo=rawhide-source --arch=src --whatrequires 'ruby-devel' | sort | uniq | wc -l 122 </pre> == Contingency Plan == * Contingency mechanism: We would like to get a special buildroot tag to be able to rebuild necessary the packages with Ruby 3.4. If anything goes wrong, the tag could be easily dropped and previous version of Ruby 3.3 and its dependencies stays intact. The tag would be merged into F42 after everything is rebuild. * Contingency deadline: Mass Rebuild * Blocks release? No == Documentation == * [http://www.ruby-doc.org/ Help and documentation for the Ruby programming language] * [https://github.com/ruby/ruby/blob/ruby_3_4/NEWS.md Ruby 3.4.0 NEWS] * [https://www.ruby-lang.org/en/news/2024/10/07/ruby-3-4-0-preview2-released/ Ruby 3.4.0 preview2 release announcement] == Release Notes == * The Ruby 3.4 bumps soname, therefore Ruby packages, which use binary extensions, should be rebuilt. Nevertheless, since upstream paid great attention to source compatibility, no changes to your code are needed. https://github.com/ruby/ruby/blob/ruby_3_4/NEWS.md -- Aoife Moloney Fedora Operations Architect Fedora Project Matrix: @amoloney:fedora.im IRC: amoloney -- _______________________________________________ devel-announce mailing list -- devel-announce@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-announce-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel-announce@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue -- _______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue