Skip to content

TruffleRuby - GraalVM Community Edition 19.3.0

Compare
Choose a tag to compare
@ezzarghili ezzarghili released this 20 Nov 16:22
· 14088 commits to master since this release

Ruby is an experimental language in the GraalVM 19.3.0 release. More information is available on the GraalVM website. Changes in 19.3.0 (from the project changelog):

New features:

  • Compilation of C extensions is now done with an internal LLVM toolchain producing both native code and bitcode. This means more C extensions should compile out of the box and this should resolve most linker-related issues.
  • It is no longer necessary to install LLVM for installing C extensions on TruffleRuby.
  • It is no longer necessary to install libc++ and libc++abi for installing C++ extensions on TruffleRuby.
  • On macOS, it is no longer necessary to install the system headers package (#1417).
  • License updated to EPL 2.0/GPL 2.0/LGPL 2.1 like recent JRuby.

Bug fixes:

  • rb_undef_method now works for private methods (#1731, @cky).
  • Fixed several issues when requiring C extensions concurrently (#1565, @eregon).
  • self.method ||= value with a private method now works correctly (#1673, @pitr-ch).
  • Fixed RegexpError: invalid multibyte escape for binary regexps with a non-binary String (#1433, @aardvark179).
  • Arrays now report their methods to other languages for interopability (#1768).
  • Installing sassc now works due to using the LLVM toolchain (#1753).
  • Renamed Truffle::Interop.respond_to? to avoid conflict with Ruby's respond_to? (#1491).
  • Warn only if $VERBOSE is true when a magic comment is ignored (#1757, @nirvdrum).
  • Make C extensions use the same libssl as the one used for the openssl C extension (#1770).

Compatibility:

  • GC.stat can now take an optional argument (#1716, @kirs).
  • Kernel#load with wrap has been implemented (#1739, @chrisseaton).
  • Implemented Kernel#spawn with :chdir (#1492).
  • Implemented rb_str_drop_bytes, notably used by OpenSSL (#1740, @cky).
  • Include executables of default gems, needed for rails new in Rails 6.
  • Use compilation flags similar to MRI for C extension compilation.
  • Warn for gem update --system as it is not fully supported yet and is often not needed.
  • Pass -undefined dynamic_lookup to the linker on macOS like MRI.

Performance:

  • Core methods are no longer always cloned, which reduces memory footprint and should improve warmup.
  • Inline cache calls to rb_intern() with a constant name in C extensions.
  • Improve allocation speed of native handles for C extensions.
  • Improve the performance of NIL_P and INT2FIX in C extensions.
  • Various fixes to improve Rack performance.
  • Optimize String#gsub(String) by not creating a Regexp and using String#index instead.
  • Fixed "FrameWithoutBoxing should not be materialized" compilation issue in TryNode.

The general GraalVM 19.2.0 release notes are available on the graalvm.org website.