Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruby 3.4 method updates #2184

Closed
soutaro opened this issue Dec 19, 2024 · 1 comment
Closed

Ruby 3.4 method updates #2184

soutaro opened this issue Dec 19, 2024 · 1 comment
Milestone

Comments

@soutaro
Copy link
Member

soutaro commented Dec 19, 2024

No description provided.

@soutaro soutaro added this to the RBS 3.8 milestone Dec 19, 2024
@soutaro
Copy link
Member Author

soutaro commented Dec 19, 2024

Extracted from NEWS.md

  • Array#fetch_values was added. [[Feature #20702]]
  • Exception#set_backtrace now accepts arrays of Thread::Backtrace::Location. Kernel#raise, Thread#raise and Fiber#raise also accept this new format. [[Feature #13557]]
  • An optional Fiber::Scheduler#blocking_operation_wait hook allows blocking operations to be moved out of the
    event loop in order to reduce latency and improve multi-core processor utilization. [[Feature #20876]]
  • GC.config added to allow setting configuration variables on the Garbage Collector. [[Feature #20443]]
  • GC configuration parameter rgengc_allow_full_mark introduced. When false GC will only mark young objects. Default is true. [[Feature #20443]]
  • Hash.new now accepts an optional capacity: argument, to preallocate the hash with a given capacity.
    This can improve performance when building large hashes incrementally by saving on reallocation and
    rehashing of keys. [[Feature #19236]]
  • IO::Buffer#copy can release the GVL, allowing other threads to run while copying data. [[Feature #20902]]
  • Integer#** used to return Float::INFINITY when the return value is large, but now returns an Integer.
    If the return value is extremely large, it raises an exception.
    [[Feature #20811]]
  • MatchData#bytebegin and MatchData#byteend have been added. [[Feature #20576]]
  • require in Ractor is allowed. The requiring process will be run on
    the main Ractor.
    Ractor._require(feature) is added to run requiring process on the
    main Ractor.
    [[Feature #20627]]
  • Ractor.main? is added. [[Feature #20627]]
  • Ractor.[] and Ractor.[]= are added to access the ractor local storage
    of the current Ractor. [[Feature #20715]]
  • Ractor.store_if_absent(key){ init } is added to initialize ractor local
    variables in thread-safty. [[Feature #20875]]
  • Range#size now raises TypeError if the range is not iterable. [[Misc #18984]]
  • Range#step now consistently has a semantics of iterating by using + operator
    for all types, not only numerics. [[Feature #18368]]
  • Rational#** used to return Float::INFINITY or Float::NAN
    when the numerator of the return value is large, but now returns an Integer.
    If it is extremely large, it raises an exception. [[Feature #20811]]
  • Add RubyVM::AbstractSyntaxTree::Node#locations method which returns location objects
    associated with the AST node. [[Feature #20624]]
  • Add RubyVM::AbstractSyntaxTree::Location class which holds location information. [[Feature #20624]]
  • String#append_as_bytes was added to more easily and efficiently work with binary buffers and protocols.
    It directly concatenate the arguments into the string without any encoding validation or conversion.
    [[Feature #20594]]
  • The string returned by Symbol#to_s now emits a deprecation warning when mutated, and will be
    frozen in a future version of Ruby.
    These warnings can be enabled with -W:deprecated or by setting Warning[:deprecated] = true.
    [[Feature #20350]]
  • On Windows, now Time#zone encodes the system timezone name in UTF-8
    instead of the active code page, if it contains non-ASCII characters.
    [[Bug #20929]]
  • Time#xmlschema, and its Time#iso8601 alias have been moved into the core Time
    class while previously it was an extension provided by the time gem. [[Feature #20707]]
  • Add Warning.categories method which returns a list of possible warning categories.
    [[Feature #20293]]
  • The keyword argument anonymous: true is implemented for Tempfile.create.
    Tempfile.create(anonymous: true) removes the created temporary file immediately.
    So applications don't need to remove the file.
    [[Feature #20497]]
  • Refinement#refined_class has been removed. [[Feature #19714]]
  • DidYouMean::SPELL_CHECKERS[]= and DidYouMean::SPELL_CHECKERS.merge! are removed.
  • Removed the following deprecated constants:
    * Net::HTTP::ProxyMod
    * Net::NetPrivate::HTTPRequest
    * Net::HTTPInformationCode
    * Net::HTTPSuccessCode
    * Net::HTTPRedirectionCode
    * Net::HTTPRetriableCode
    * Net::HTTPClientErrorCode
    * Net::HTTPFatalErrorCode
    * Net::HTTPServerErrorCode
    * Net::HTTPResponseReceiver
    * Net::HTTPResponceReceiver

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant