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:
- Updated to Ruby 3.3.5 (#3681, @andrykonchin, @eregon).
Bug fixes:
- Fix
Module#name
called inside theModule#const_added
callback when the module is defined in the top-level scope (#3683, @andrykonchin). - Fix duplicated calls of a
Module#const_added
callback when a module with nested modules is assigned to a constant (@andrykonchin). - Support OpenSSL 1.1-3.4 and prefer in order OpenSSL 3.0.x, 3.x and 1.1 (EOL). There was a compilation issue with OpenSSL 3.4 (#3724, @eregon).
- Fix
Time{.at,.new,.now,#getlocal,#localtime}
methods and validation of seconds in utc offset in String format (@andrykonchin). - Fix
ObjectSpace.undefine_finalizer
and raiseFrozenError
when called for a frozen object (@andrykonchin). - Fix
Integer#/
when called with a bignum argument (@andrykonchin).
Compatibility:
- Fix
Module#include
so a module included into a reopened nested module is added into an ancestors chain (#3570, @andrykonchin). - Fix
Kernel#eval
to ignore shebang with non-Ruby interpreter (#3623, @andrykonchin). - Fix
Env#delete
and return value returned by a block if variable doesn't exist (@andrykonchin). - Fix
Env#update
and accept multiple hashes (@andrykonchin). - Add
MAJOR
,MINOR
,TEENY
,PATCHLEVEL
,RUBY_API_VERSION
, andRUBY_PROGRAM_VERSION
toRbConfig::CONFIG
(#3396, @rwstauner). - Set
RbConfig::CONFIG['archincludedir']
(#3396, @andrykonchin). - Support the index/length arguments for the string argument to
String#bytesplice
added in 3.3 (#3656, @rwstauner). - Implement
rb_str_strlen()
(#3697, @Th3-M4jor). - Support
Time.new
with String argument and error when invalid (#3693, @rwstauner). - Implement
rb_enc_interned_str()
(#3703, @Th3-M4jor). - Implement
rb_hash_bulk_insert()
(#3705, @Th3-M4jor). - Remove deprecated
Pathname#{taint,untaint}
methods (#3681, @andrykonchin). - Add
rb_category_warn
function (#3710, @andrykonchin). - Add
rb_gc_mark_locations()
(#3704, @andrykonchin). - Implement
rb_str_format()
(#3716, @andrykonchin). - Add
IO#{pread, pwrite}
methods (#3718, @andrykonchin). - Add
rb_io_closed_p()
(#3681, @andrykonchin). - Add
rb_io_open_descriptor()
(#3681, @andrykonchin). - Support serializing of
Data
instances into Marshal format (#3726, @andrykonchin). Array#pack
now raisesArgumentError
for unknown directives (#3681, @Th3-M4jor).String#unpack
now raisesArgumentError
for unknown directives (#3681, @Th3-M4jor).Thread::Queue#freeze
now raisesTypeError
when called (#3681, @Th3-M4jor).Thread::SizedQueue#freeze
now raisesTypeError
when called (#3681, @Th3-M4jor).- Add
Range#reverse_each
(#3681, @andrykonchin). - Emit a warning when
it
call without arguments is used in a block without parameters (#3681, @andrykonchin). - Add
rb_syserr_fail_str()
(#3732, @andrykonchin). - Add
Dir.for_fd
(#3681, @andrykonchin). - Add
Dir.fchdir
(#3681, @andrykonchin). - Add
Dir#chdir
(#3681, @andrykonchin). - Declare
File::SHARE_DELETE
constant (#3745, @andrykonchin). - Support
symbolize_names
argument toMatchData#named_captures
(#3681, @rwstauner). - Support
Proc#initialize_{dup,copy}
for subclasses (#3681, @rwstauner). - Remove deprecated
Encoding#replicate
method (#3681, @rwstauner). - Add
ObjectSpace::WeakMap#delete
(#3681, @andrykonchin). Kernel#lambda
with now raisesArgumentError
when given a non-lambda, non-literal block (#3681, @Th3-M4jor).- Add
rb_data_define()
to define Data (#3681, @andrykonchin). - Add
Refinement#target
(#3681, @andrykonchin). - Add
Range#overlap?
(#3681, @andrykonchin). - Update
NoMethodError#message
to not use#inspect
on receiver (#3681, @rwstauner). - Socket
#recv*
methods ({BasicSocket,IPSocket,TCPSocket,UDPSocket,Socket}#{recv,recv_nonblock,recvmsg,recvmsg_nonblock,recvfrom,recvfrom_nonblock}
) returnnil
instead of an empty String on closed connections (#3681, @andrykonchyn). - Fix
Marshal.dump
when a Float value is dumped repeatedly (#3747, @andrykochin). - Emit warning when
Kernel#format
called with excessive arguments (@andrykonchin). - Fix
Integer#ceil
when self is 0 (@andrykonchin). - Fix
Module#remove_const
and emit warning when constant is deprecated (@andrykonchin). - Add
Module#set_temporary_name
(#3681, @andrykonchin). - Modify
Float#round
to match MRI behavior (#3676, @andrykonchin). - Support Timezone argument to
Time.{new,at}
andTime#{getlocal,localtime}
(#1717, @patricklinpl, @manefz, @rwstauner).
Performance:
- Speedup some C extensions like
sqlite3
,trilogy
andjson
by 2 to 3 times by using the Panama NFI backend for faster upcalls in JVM mode (@eregon). - Optimize encoding negotiation for ASCII-compatible encodings (@eregon, @andrykonchin).
Changes:
- Inherit
Polyglot::ForeignException
fromStandardError
instead ofException
(#3620, @andrykonchin).