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:
Bug fixes:
- Fix
Module#namecalled inside theModule#const_addedcallback when the module is defined in the top-level scope (#3683, @andrykonchin). - Fix duplicated calls of a
Module#const_addedcallback 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_finalizerand raiseFrozenErrorwhen called for a frozen object (@andrykonchin). - Fix
Integer#/when called with a bignum argument (@andrykonchin).
Compatibility:
- Fix
Module#includeso a module included into a reopened nested module is added into an ancestors chain (#3570, @andrykonchin). - Fix
Kernel#evalto ignore shebang with non-Ruby interpreter (#3623, @andrykonchin). - Fix
Env#deleteand return value returned by a block if variable doesn't exist (@andrykonchin). - Fix
Env#updateand accept multiple hashes (@andrykonchin). - Add
MAJOR,MINOR,TEENY,PATCHLEVEL,RUBY_API_VERSION, andRUBY_PROGRAM_VERSIONtoRbConfig::CONFIG(#3396, @rwstauner). - Set
RbConfig::CONFIG['archincludedir'](#3396, @andrykonchin). - Support the index/length arguments for the string argument to
String#bytespliceadded in 3.3 (#3656, @rwstauner). - Implement
rb_str_strlen()(#3697, @Th3-M4jor). - Support
Time.newwith 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_warnfunction (#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
Datainstances into Marshal format (#3726, @andrykonchin). Array#packnow raisesArgumentErrorfor unknown directives (#3681, @Th3-M4jor).String#unpacknow raisesArgumentErrorfor unknown directives (#3681, @Th3-M4jor).Thread::Queue#freezenow raisesTypeErrorwhen called (#3681, @Th3-M4jor).Thread::SizedQueue#freezenow raisesTypeErrorwhen called (#3681, @Th3-M4jor).- Add
Range#reverse_each(#3681, @andrykonchin). - Emit a warning when
itcall 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_DELETEconstant (#3745, @andrykonchin). - Support
symbolize_namesargument toMatchData#named_captures(#3681, @rwstauner). - Support
Proc#initialize_{dup,copy}for subclasses (#3681, @rwstauner). - Remove deprecated
Encoding#replicatemethod (#3681, @rwstauner). - Add
ObjectSpace::WeakMap#delete(#3681, @andrykonchin). Kernel#lambdawith now raisesArgumentErrorwhen 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#messageto not use#inspecton receiver (#3681, @rwstauner). - Socket
#recv*methods ({BasicSocket,IPSocket,TCPSocket,UDPSocket,Socket}#{recv,recv_nonblock,recvmsg,recvmsg_nonblock,recvfrom,recvfrom_nonblock}) returnnilinstead of an empty String on closed connections (#3681, @andrykonchyn). - Fix
Marshal.dumpwhen a Float value is dumped repeatedly (#3747, @andrykochin). - Emit warning when
Kernel#formatcalled with excessive arguments (@andrykonchin). - Fix
Integer#ceilwhen self is 0 (@andrykonchin). - Fix
Module#remove_constand emit warning when constant is deprecated (@andrykonchin). - Add
Module#set_temporary_name(#3681, @andrykonchin). - Modify
Float#roundto 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,trilogyandjsonby 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::ForeignExceptionfromStandardErrorinstead ofException(#3620, @andrykonchin).