Skip to content

TruffleRuby 24.0.0

Compare
Choose a tag to compare
@ezzarghili ezzarghili released this 19 Mar 15:00
· 276 commits to master since this release

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 always ArgumentError (#3267, @eregon).
  • Fix IO.copy_stream with a Tempfile destination (#3280, @eregon).
  • Fix Regexp.union negotiating the wrong result encoding (#3287, @nirvdrum, @simonlevasseur).
  • Fix Proc#parameters and 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 macOS poll(2) (#3346, @eregon, @andrykonchin).
  • Run context cleanup such as showing the output of tools when SignalException and Interrupt escape (@eregon).
  • Handle a new variable inside the case target expression correctly (#3377, @eregon).
  • The arguments of Thread.new(*args, &block) need to be marked as shared between multiple threads (#3179, @eregon).
  • Fix Range#bsearch and raise TypeError when range boundaries are non-numeric and block not passed (@andrykonchin).
  • Fix using the --cpusampler profiler when there are custom unblock functions for rb_thread_call_without_gvl() (#3013, @eregon).
  • Fix recursive raising FrozenError exception when redefined #inspect modifies an object (#3388, @andrykonchin).
  • Fix Integer#div returning the wrong object type when the divisor is a Rational (@simonlevasseur, @nirvdrum).
  • Remove constant Random::DEFAULT (#3039, @patricklinpl)

Compatibility:

Performance:

  • Change the Hash representation from traditional buckets to a "compact hash table" for improved locality, performance and memory footprint (#3172, @moste00).
  • Optimize calls with ruby2_keywords forwarding 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 :string arguments to a FFI call and used later for Regexp matching (#3293, @eregon).