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:
- Add support for
darwin-aarch64
(Apple Silicon) (#2181, @lewurm, @chrisseaton, @eregon). - Add support for OpenSSL 3.0.0 by updating the openssl gem (@aardvark179, @eregon).
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 theinitialize
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 acceptString
s (#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 returnnil
when theWNOHANG
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
andrb_global_variable
to ensureVALUE
stay live in C extensions (@aardvark179). - Implement
rb_imemo_tmpbuf
allocation forripper
(@aardvark179). - Implement
inherit
argument forModule#class_variables
(#2653, @bjfish). - Fix
Float#/
when dividing byRational
(@bjfish). Process.euid=
should accept String (#2615, @ngtban).- Fix
instance_variable_get
andinstance_variable_set
for immutable objects (@bjfish). Thread#raise(exc, message)
now callsexc.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 inIO
andStringIO
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 haveT_FILE
as theirrb_type()
, not onlyFile
instances (#2662, @eregon). - Make
rb_fd_select
retry onEINTR
(#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: