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).