Skip to content

TruffleRuby - GraalVM Community Edition 22.2.0

Compare
Choose a tag to compare
@ezzarghili ezzarghili released this 26 Jul 11:30
· 4111 commits to master since this release

TruffleRuby is a high-performance implementation of the Ruby programming language.
TruffleRuby aims to be fully compatible with the standard implementation of Ruby, MRI.
The Ruby language component can be added to GraalVM using the gu utility.
More information is available on the website: http://www.graalvm.org/ruby/

Changelog

New features:

Bug fixes:

  • Fix rb_id2name to ensure the native string will have the same lifetime as the id (#2630, @aardvark179).
  • Fix MatchData#[] exception when passing a length argument larger than the number of match values (#2636, @nirvdrum).
  • Fix MatchData#[] exception when supplying a large negative index along with a length argument (@nirvdrum).
  • Fix capacity computation for huge Hash (#2635, @eregon).
  • Fix aliased methods to return the correct owner when method is from a superclass (@bjfish).
  • Fix String#[Regexp, Integer] when the capture group exists but is not matched (@eregon).
  • Fix File.open mode string parsing when binary option is the third character (@bjfish).
  • Fix rb_scan_args_kw macro to avoid shadowing variables (#2649, @aardvark179).
  • Fix String#unpack("Z") to not advance after the null byte, like CRuby (#2659, @aardvark179).
  • Fix Float#round to avoid losing precision during the rounding process (@aardvark179).
  • Fix String#insert to not call a subclassed string method (@bjfish).
  • Fix rb_obj_call_init to pass any block argument to the initialize method (#2675, @aardvark179).
  • Fix issue with feature loading not detecting a previously loaded feature (#2677, @bjfish).
  • Fix /#{...}/o to evaluate only once per context when splitting happens (@eregon).
  • Fix Kernel#sprintf formatting of floats to be like CRuby (@aardvark179).
  • Fix Process.egid= to accept Strings (#2615, @ngtban)
  • Fix optional assignment to only evaluate index arguments once (#2658, @aardvark179).

Compatibility:

  • Updated to Ruby 3.0.3. The 3 CVEs did not affect TruffleRuby, this is to bring the stdlib and gem updates (@eregon).
  • Fix Marshal.dump to raise an error when an object has singleton methods (@bjfish).
  • Exception#full_message now defaults the order to :top like CRuby 3+ (@eregon).
  • Fix Process.wait2 to return nil when the WNOHANG flag is given and the child process is still running (@bjfish).
  • Disable most nokogiri C extension patches when system libraries are not being used (#2693, @aardvark179).
  • Implement rb_gc_mark_maybe and rb_global_variable to ensure VALUE stay live in C extensions (@aardvark179).
  • Implement rb_imemo_tmpbuf allocation for ripper (@aardvark179).
  • Implement inherit argument for Module#class_variables (#2653, @bjfish).
  • Fix Float#/ when dividing by Rational (@bjfish).
  • Process.euid= should accept String (#2615, @ngtban).
  • Fix instance_variable_get and instance_variable_set for immutable objects (@bjfish).
  • Thread#raise(exc, message) now calls exc.exception in the target thread like CRuby (@eregon).
  • Define Process::{CLOCK_BOOTTIME,CLOCK_BOOTTIME_ALARM,CLOCK_REALTIME_ALARM} (#1480, @eregon).
  • Improve support of :chomp keyword argument in IO and StringIO methods (#2650, @andrykonchin).
  • Implement specializations for immutable ruby objects for ObjectSpace methods (@bjfish).
  • Use $PAGER for --help and --help*, similar to CRuby (#2542, @Strech).
  • Ensure all headers are warnings-free (#2662, @eregon).
  • All IO instances should have T_FILE as their rb_type(), not only File instances (#2662, @eregon).
  • Make rb_fd_select retry on EINTR (#1584, @aardvark179).

Performance:

  • Reimplement Float#to_s for better performance (#1584, @aardvark179).
  • Improve reference processing by making C object free functions and other finalizers more lightweight (@aardvark179).
  • Improve performance of RSTRING_PTR for interned strings (@aardvark179).
  • Cache constant argument formats used with rb_scan_args_kw (@aardvark179).

Changes:

  • -Werror=implicit-function-declaration is now used for compiling C extensions to fail more clearly and earlier if a function is missing, like CRuby 3.2 (#2618, @eregon).
  • Disable thread pool for Fibers as it causes correctness issues (#2551, @eregon).