TruffleRuby 24.0.0
·
490 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.
More information is available on the website: http://www.graalvm.org/ruby/
TruffleRuby comes in two standalone modes, native
and jvm
, for both Oracle GraalVM and Community Edition.
See the documentation for which release asset corresponds to what.
Changelog
New features:
- C/C++ extensions are now compiled using the system toolchain and executed natively instead of using GraalVM LLVM (Sulong). This leads to faster startup, no warmup, better compatibility, smaller distribution and faster installation for C/C++ extensions (#3118, @eregon).
- Full support for the Ruby 3.2 and Ruby 3.3 syntax by adopting the Prism parser, which is about twice as fast as the old parser (#3117, #3038, #3039, @andrykonchin, @eregon).
- Pattern matching is now fully supported (#3332, #2683, @eregon, @razetime).
Bug fixes:
- Fix
rb_enc_left_char_head()
so it is not alwaysArgumentError
(#3267, @eregon). - Fix
IO.copy_stream
with aTempfile
destination (#3280, @eregon). - Fix
Regexp.union
negotiating the wrong result encoding (#3287, @nirvdrum, @simonlevasseur). - Fix
Proc#parameters
and return all the numbered parameters lower than the used explicitly ones (@andrykonchin). - Fix some C API functions which were failing when called with Ruby values represented as Java primitives (#3352, @eregon).
- Fix
IO.select([io], nil, [io])
on macOS, it was hanging due to a bug in macOSpoll(2)
(#3346, @eregon, @andrykonchin). - Run context cleanup such as showing the output of tools when
SignalException
andInterrupt
escape (@eregon). - Handle a new variable inside the
case
target expression correctly (#3377, @eregon). - The arguments of
Thread.new(*args, &block)
need to be marked as shared between multiple threads (#3179, @eregon). - Fix
Range#bsearch
and raiseTypeError
when range boundaries are non-numeric and block not passed (@andrykonchin). - Fix using the
--cpusampler
profiler when there are custom unblock functions forrb_thread_call_without_gvl()
(#3013, @eregon). - Fix recursive raising
FrozenError
exception when redefined#inspect
modifies an object (#3388, @andrykonchin). - Fix
Integer#div
returning the wrong object type when the divisor is aRational
(@simonlevasseur, @nirvdrum). - Remove constant
Random::DEFAULT
(#3039, @patricklinpl)
Compatibility:
- Add
Exception#detailed_message
method (#3257, @andrykonchin). - Fix
rb_enc_vsprintf
and force String encoding instead of converting it (@andrykonchin). - Add
rb_gc_mark_movable
function (@andrykonchin). - Promote
File#path
andFile#to_path
toIO#path
andIO#to_path
and make IO#new accept an optionalpath:
keyword argument (#3039, @moste00) - Display "unhandled exception" as the message for
RuntimeError
instances with an empty message (#3255, @nirvdrum). - Set
RbConfig::CONFIG['configure_args']
for openssl and libyaml (#3170, #3303, @eregon). - Support
Socket.sockaddr_in(port, Socket::INADDR_ANY)
(#3361, @mtortonesi). - Implement the
Data
class from Ruby 3.2 (#3039, @moste00, @eregon). - Make
Coverage.start
andCoverage.result
accept parameters (#3149, @mtortonesi, @andrykonchin). - Implement
rb_check_funcall()
(@eregon). - Implement
MatchData#{byteoffset,deconstruct,deconstruct_keys}
from Ruby 3.2 (#3039, @rwstauner). - Add
Integer#ceildiv
method (#3039, @simonlevasseur, @nirvdrum). - Implement
Class#attached_object
method (#3039, @andrykonchin). - Fix
ENV#{clone,dup}
and raiseTypeError
(#3039, @andrykonchin). - Fix
Coverage.supported?
and raiseTypeError
if argument is not Symbol (#3039, @andrykonchin). - Accept options argument to
Regexp.{new,compile}
of String and warn for unknown types (#3039, @rwstauner). - Implement
Time#deconstruct_keys
from Ruby 3.2 (#3039, @rwstauner). - Do not autosplat a proc that accepts a single positional argument and keywords (#3039, @andrykonchin).
- Support passing anonymous * and ** parameters as method call arguments (#3039, @andrykonchin).
- Handle either positional or keywords arguments by default in
Struct.new
(#3039, @rwstauner). - Promote
Set
class to core library (#3039, @andrykonchin). - Support
connect_timeout
keyword argument toTCPSocket.{new,open}
(#3421, @manefz, @patricklinpl, @nirvdrum, @rwstauner). - Add
File.lutime
andPathname#lutime
methods (#3039, @andrykonchin). - Add a deprecation warning for
Encoding#replicate
(#3039, @patricklinpl, @manefz, @nirvdrum). - Change
UnboundMethod#{==,inspect}
to use the owner module rather than the origin (#3039, @rwstauner, @manefz, @patricklinpl) - Support
lambda
keyword argument inProc#parameters
(#3039, @thomasmarshall, @goyox86). - Limit maximum encoding set size by 256 (#3039, @thomasmarshall, @goyox86).
- Remove deprecated methods
Dir.exists?
,File.exists?
, andKernel#=~
(#3039, @patricklinpl, @nirvdrum). - Remove deprecated
FileTest.exists?
method (#3039, @andrykonchin). - Fix {Method,Proc}#parameters and return
*
,**
and&
names for anonymous parameters (@andrykonchin). - Remove deprecated
Fixnum
andBignum
constants (#3039, @andrykonchin). - Add
rb_enc_interned_str_cstr
function (#3408, @goyox86, @thomasmarshall). - Add
rb_str_to_interned_str
function (#3408, @thomasmarshall).
Performance:
- Change the
Hash
representation from traditional buckets to a "compact hash table" for improved locality, performance and memory footprint (#3172, @moste00). - Optimize calls with
ruby2_keywords
forwarding by deciding it per call site instead of per callee thanks to my fix in CRuby 3.2 (@eregon). - Optimize feature loading when require is called with an absolute path to a .rb file (@rwstauner).
- Avoid extra copies for Strings passed as
:string
arguments to a FFI call and used later for Regexp matching (#3293, @eregon).