github oracle/truffleruby graal-24.1.0
TruffleRuby 24.1.0

latest release: graal-24.1.1
one month ago

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:

  • 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() for Float and bignum values during the Init_ function (#3478, @eregon).
  • Fix rb_gc_register_mark_object() for Float and 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#recvfrom and 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 #each for a foreign iterator which is also iterable (#3630, @eregon).

Compatibility:

  • Move IO#wait_readable, IO#wait_writable, IO#wait_priority and IO#wait into 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 a Kernel#at_exit hook raises an exception (#3535, @andrykonchin).
  • Support :buffer keyword argument to Array#pack (#3559, @andrykonchin).
  • Set RbConfig::CONFIG['host_cpu'] to arm64 on darwin platform (#3571, @andrykonchin).
  • Fix RegexpError messages to match CRuby better (#3398, @andrykonchin).
  • Fix Enumerable#reduce to handle non-Symbol method name parameter (#2931, @andrykonchin).
  • Fix RangeError message to match CRuby for Integer#chr called with invalid codepoint argument (#2795, @andrykonchin).
  • Joni has been updated from 2.1.44 to 2.2.1 (@andrykonchin).
  • Fix Hash#to_h called with a block and pass key and value to the block as separate arguments (#3607, @andrykonchin).
  • Fix StringIO#initialize and preserve initial string's encoding when mode is w so the initial string is truncated (#3599, @andrykonchin).
  • Fix IO#{autoclose=,autoclose?} and raise IOError when 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_message when RuntimeError is not handled and highlight option is specified (@andrykonchin).
  • Fix String#encode and convert fallback values into String using #to_str (@andrykonchin).
  • Fix Kernel.warn and don't call Warning#warn if a specified category is disabled (@andrykonchin).
  • Fix $! global variable and make it fiber-local (@andrykonchin).
  • Fix rb_set_errinfo and rb_errinfo and store an error separately from $! (#2890, @andrykonchin).
  • Fix rb_mutex_synchronize to not wrap/unwrap result value (#3624, @andrykonchin).
  • Add StringIO#set_encoding_by_bom method (#3632, @andrykonchin).
  • Fix Kernel#eval to ignore shebang with non-Ruby interpreter (#3623, @andrykonchin).
  • Add SyntaxError#path (#3433, @wasabigeek).
  • Reuse the precompiled sass-embedded gem as-is on TruffleRuby (#3565, @ntkme).

Performance:

  • Fix inline caching for Regexp creation from Strings (#3492, @andrykonchin, @eregon).
  • Optimize Integer#pow method 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:

  • Use inlined core method nodes even when modules are prepended to core classes (#3546, @eregon).
  • Reduce empty array allocations (#3517, @nirvdrum).

Don't miss a new truffleruby release

NewReleases is sending notifications on new releases.