Releases: truffleruby/truffleruby
TruffleRuby 25.0.0
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 in the README.
TruffleRuby comes in two standalone modes, native and jvm, each built with both Oracle GraalVM and Community Edition.
See the documentation for which release asset corresponds to what.
Changelog
New features:
- Run C extensions marked as
rb_ext_ractor_safe()orrb_ext_thread_safe()in parallel (without the C extension lock) (#2136, @eregon).
Bug fixes:
- Fix
Range#cover?on begin-less ranges and non-integer values (@nirvdrum, @rwstauner). - Fix
Time.newwith String argument and handle nanoseconds correctly (#3836, @andrykonchin). - Fix a possible case of infinite recursion when implementing
frozen?in a native extension (@nirvdrum). - Fix parameters forwarding to a method call executed with
Kernel#eval(@andrykonchin). - Fix segfaults in native extensions when the reference processing thread is interrupted and would
longjmp()incorrectly (#3903, @eregon).
Compatibility:
- Support Timezone argument to
Time.{new,at}andTime#{getlocal,localtime}(#1717, @patricklinpl, @manefz, @rwstauner). - Updated to Ruby 3.3.7 (@andrykonchin).
- Implement
StringScanner#{peek_byte,scan_byte,scan_integer,named_captures}methods (#3788, @andrykonchin). - Support String patterns in
StringScanner#{exist?,scan_until,skip_until,check_until,search_full}methods (@andrykonchin). - Implement
ObjectSpace::WeakKeyMap(#3681, @andrykonchin). - Fix
String#slicecalled with negative offset (@andrykonchin). - Fix explicitly inherited
Structsubclasses and don't provide#membersmethod (#3802, @andrykonchin). - Support Digest plugins (#1390, @nirvdrum).
- Joni has been updated from 2.2.1 to 2.2.6 (@andrykonchin).
- Fix numeric coercing when
#coercemethod is not public (#3848, @andrykonchin). - Fix
Kernel#raiseand don't overridecauseat exception re-raising (#3831, @andrykonchin). - Return a pointer with
#type_sizeof 1 forPointer#read_pointer(@eregon). - Fix
rb_str_locktmp()andrb_str_unlocktmp()to raiseFrozenErrorwhen string argument is frozen (#3752, @andrykonchin). - Fix Struct setters to raise
FrozenErrorwhen a struct is frozen (#3850, @andrykonchin). - Fix
Struct#initializewhen mixed positional and keyword arguments (#3855, @andrykonchin). - Fix
Integer.sqrtfor large values (#3872, @tompng). - Fix
Data#inspectwhen data contains a recursive attribute (#3847, @andrykonchin). - Fix
StringIO#{gets,readline}when it is called with both separator and limit to truncate the separator if the limit is exceeded (#3856, @andrykonchin). - Implement
rb_error_frozen_objectfor the google-protobuf gem (@nirvdrum). - Adjust a
FrozenError's message and add a receiver when a frozen module or class is modified (e.g. by defining or undefining an instance method or by defining a nested module (@andrykonchin). - Fix
Kernel#sprintfand%pformat specification to produce"nil"fornilargument (#3846, @andrykonchin). - Reimplement
Data#withto not callData.newthat can be removed or redefined (#3890, @andrykonchin).
Performance:
TruffleRuby 24.2.2
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.
Changes:
- Update GraalVM base to 24.2.2
TruffleRuby 24.2.1
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.7 (@andrykonchin).
TruffleRuby 24.2.0
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#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).
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).
TruffleRuby 24.1.2
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
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).
TruffleRuby 24.1.1
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
- Build based on GraalVM for JDK 23.0.1 (24.1.1)
TruffleRuby 24.1.0
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:
- Update to Ruby 3.2.4 (@andrykonchin).
- Add
--reuse-precompiled-gemsoption (@andrykonchin).
Bug fixes:
- Add missing thread-safe objects write barriers for
TruffleRuby::ConcurrentMap(#3179, @eregon). - Fix repeated calling of methods
Dir#{each,each_child,children}(#3464, @andrykonchin). - Fix
IO#{wait,wait_readable,wait_writable}methods and switch the current thread into a sleep state (@andrykonchin). - Fix
rb_global_variable()forFloatand bignum values during theInit_function (#3478, @eregon). - Fix
rb_gc_register_mark_object()forFloatand bignum values (#3502, @eregon, @andrykonchin). - Fix parsing literal floats when the locale does not use
.for the decimal separator (e.g.LANG=fr_FR.UTF-8) (#3512, @eregon). - Fix
IO#{read_nonblock,readpartial,sysread},BasicSocket#{recv,recv_nonblock},{Socket,UDPSocket}#recvfrom_nonblock,UnixSocket#recvfromand preserve a provided buffer's encoding (#3506, @andrykonchin). - Repair
IO#{wait_readable,wait_writable,wait}to be interruptible (#3504, @andrykonchin). - Fix Hash value omission for constant names (@andrykonchin).
- Fix
MatchData#[index, length]when index is larger than number of matched values (@andrykonchin). - Fix
#eachfor a foreign iterator which is also iterable (#3630, @eregon).
Compatibility:
- Move
IO#wait_readable,IO#wait_writable,IO#wait_priorityandIO#waitinto core library (@andrykonchin). - Change assignment evaluation order for fully qualified constant and evaluate left-hand-side before right-hand-side (#3039, @andrykonchin).
- Fix evaluation order for multi-assignment and evaluate left-hand-side before right-hand-side (@andrykonchin).
- Add
Regexp.linear_time?method (#3039, @andrykonchin). - Allow null encoding pointer in
rb_enc_interned_str_cstr(@thomasmarshall). - Allow anonymous memberless Struct (@simonlevasseur).
- Set
$!when aKernel#at_exithook raises an exception (#3535, @andrykonchin). - Support
:bufferkeyword argument toArray#pack(#3559, @andrykonchin). - Set
RbConfig::CONFIG['host_cpu']toarm64on darwin platform (#3571, @andrykonchin). - Fix
RegexpErrormessages to match CRuby better (#3398, @andrykonchin). - Fix
Enumerable#reduceto handle non-Symbol method name parameter (#2931, @andrykonchin). - Fix
RangeErrormessage to match CRuby forInteger#chrcalled with invalid codepoint argument (#2795, @andrykonchin). - Joni has been updated from 2.1.44 to 2.2.1 (@andrykonchin).
- Fix
Hash#to_hcalled with a block and pass key and value to the block as separate arguments (#3607, @andrykonchin). - Fix
StringIO#initializeand preserve initial string's encoding when mode iswso the initial string is truncated (#3599, @andrykonchin). - Fix
IO#{autoclose=,autoclose?}and raiseIOErrorwhen io is closed (@andrykonchin). - Fix
Thread#{thread_variable_get,thread_variable_set,thread_variable?,key?,[],[]=,fetch}and convert a non-String/Symbol thread-local variable name to String using#to_str(@andrykonchin). - Fix formatting in
Exception#full_messagewhenRuntimeErroris not handled andhighlightoption is specified (@andrykonchin). - Fix
String#encodeand convert fallback values into String using#to_str(@andrykonchin). - Fix
Kernel.warnand don't callWarning#warnif a specified category is disabled (@andrykonchin). - Fix
$!global variable and make it fiber-local (@andrykonchin). - Fix
rb_set_errinfoandrb_errinfoand store an error separately from$!(#2890, @andrykonchin). - Fix
rb_mutex_synchronizeto not wrap/unwrap result value (#3624, @andrykonchin). - Add
StringIO#set_encoding_by_bommethod (#3632, @andrykonchin). - Fix
Kernel#evalto ignore shebang with non-Ruby interpreter (#3623, @andrykonchin). - Add
SyntaxError#path(#3433, @wasabigeek). - Reuse the precompiled
sass-embeddedgem as-is on TruffleRuby (#3565, @ntkme).
Performance:
- Fix inline caching for Regexp creation from Strings (#3492, @andrykonchin, @eregon).
- Optimize
Integer#powmethod for small modulus values (#3544, @andrykonchin). - Avoid repeated copies from native to managed string when matching Regexps on a native string (#2193, @eregon).
- Report polymorphism for
Kernel#sprintf(#3537, @nirvdrum). - Review all inline caches to appropriately use splitting to make the best use of these inline caches (@andrykonchin, @eregon).
Memory Footprint:
TruffleRuby 24.0.2
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
- Build based on GraalVM for JDK 22.0.2 (24.0.2)
TruffleRuby 24.0.1
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
Bug fixes:
Performance:
- Fix inline caching for Regexp creation from Strings (#3492, @andrykonchin, @eregon).
TruffleRuby 24.0.0
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_streamwith aTempfiledestination (#3280, @eregon). - Fix
Regexp.unionnegotiating the wrong result encoding (#3287, @nirvdrum, @simonlevasseur). - Fix
Proc#parametersand 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
SignalExceptionandInterruptescape (@eregon). - Handle a new variable inside the
casetarget expression correctly (#3377, @eregon). - The arguments of
Thread.new(*args, &block)need to be marked as shared between multiple threads (#3179, @eregon). - Fix
Range#bsearchand raiseTypeErrorwhen range boundaries are non-numeric and block not passed (@andrykonchin). - Fix using the
--cpusamplerprofiler when there are custom unblock functions forrb_thread_call_without_gvl()(#3013, @eregon). - Fix recursive raising
FrozenErrorexception when redefined#inspectmodifies an object (#3388, @andrykonchin). - Fix
Integer#divreturning the wrong object type when the divisor is aRational(@simonlevasseur, @nirvdrum). - Remove constant
Random::DEFAULT(#3039, @patricklinpl)
Compatibility:
- Add
Exception#detailed_messagemethod (#3257, @andrykonchin). - Fix
rb_enc_vsprintfand force String encoding instead of converting it (@andrykonchin). - Add
rb_gc_mark_movablefunction (@andrykonchin). - Promote
File#pathandFile#to_pathtoIO#pathandIO#to_pathand make IO#new accept an optionalpath:keyword argument (#3039, @moste00) - Display "unhandled exception" as the message for
RuntimeErrorinstances 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
Dataclass from Ruby 3.2 (#3039, @moste00, @eregon). - Make
Coverage.startandCoverage.resultaccept parameters (#3149, @mtortonesi, @andrykonchin). - Implement
rb_check_funcall()(@eregon). - Implement
MatchData#{byteoffset,deconstruct,deconstruct_keys}from Ruby 3.2 (#3039, @rwstauner). - Add
Integer#ceildivmethod (#3039, @simonlevasseur, @nirvdrum). - Implement
Class#attached_objectmethod (#3039, @andrykonchin). - Fix
ENV#{clone,dup}and raiseTypeError(#3039, @andrykonchin). - Fix
Coverage.supported?and raiseTypeErrorif 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_keysfrom 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
Setclass to core library (#3039, @andrykonchin). - Support
connect_timeoutkeyword argument toTCPSocket.{new,open}(#3421, @manefz, @patricklinpl, @nirvdrum, @rwstauner). - Add
File.lutimeandPathname#lutimemethods (#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
lambdakeyword 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
FixnumandBignumconstants (#3039, @andrykonchin). - Add
rb_enc_interned_str_cstrfunction (#3408, @goyox86, @thomasmarshall). - Add
rb_str_to_interned_strfunction (#3408, @thomasmarshall).
Performance:
- Change the
Hashrepresentation from traditional buckets to a "compact hash table" for improved locality, performance and memory footprint (#3172, @moste00). - Optimize calls with
ruby2_keywordsforwarding 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
:stringarguments to a FFI call and used later for Regexp matching (#3293, @eregon).