github oracle/truffleruby vm-20.2.0
TruffleRuby - GraalVM Community Edition 20.2.0

latest releases: graal-24.1.1, graal-24.1.0, vm-ee-24.1.0...
4 years 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, version 2.6.6.

More information is available on the GraalVM website: http://www.graalvm.org/docs/reference-manual/ruby/

Changelog

20.2.0

New features:

  • Updated to Ruby 2.6.6.
  • Use InteropLibrary#toDisplayString() to better display objects from other languages.
  • Implement writing to the top scope for global variables (#2024).
  • foreign_object.to_s now uses InteropLibrary#toDisplayString() (and still asString() if isString()).
  • foreign_object.inspect has been improved to be more useful (include the language and meta object).
  • foreign_object.class now calls getMetaObject() (except for Java classes, same as before).
  • Add basic support for Linux ARM64.
  • foreign_object.name = value will now call Interoplibrary#writeMember("name", value) instead of invokeMember("name=", value).
  • Always show the Ruby core library files in backtraces (#1414).
  • The Java stacktrace is now shown when sending SIGQUIT to the process, also on TruffleRuby Native, see Debugging for details (#2041).
  • Calls to foreign objects with a block argument will now pass the block as the last argument.
  • foreign.name will now use invokeMember if invocable and if not use readMember, see doc/contrib/interop_implicit_api.md for details.
  • foreign.to_f and foreign.to_i will now attempt to convert to Ruby Float and Integer (#2038).
  • foreign.equal?(other) now uses InteropLibrary#isIdentical(other) and foreign.object_id/__id__ now uses InteropLibrary#identityHashCode().

Bug fixes:

  • Fix #class_exec, #module_exec, #instance_eval, and instance_exec to use activated refinements (#1988, @ssnickolay).
  • Fixed missing method error for FFI calls with blocking: true when interrupted.
  • Use upgraded default gems when installed (#1956).
  • Fixed NameError when requiring an autoload path that does not define the autoload constant (#1905).
  • Thread local IO buffers are now allocated using a stack to ensure safe operating if a signal handler uses one during an IO operation.
  • Fixed TracePoint thread-safety by storing the state on the Ruby Thread (like MRI) instead of inside the TracePoint instance.
  • Make require 'rubygems/package' succeed and define Gem::Deprecate correctly (#2014).
  • Fix MBCLEN_CHARFOUND_P error.
  • Fix rb_enc_str_new when NULL encoding is given with a constant string.
  • Fixed rb_enc_precise_mbclen to handle more inputs.
  • The output for --engine.TraceCompilation is now significantly easier to read, by having shorter method names and source names (oracle/graal#2052).
  • Fix indentation for squiggly heredoc with single quotes (#1564).
  • Only print members which are readable for foreign #inspect (#2027).
  • Fixed the return value of the first call to Kernel#srand in a Thread (#2028).
  • Fix missing flushing when printing an exception at top-level with a custom backtrace, which caused no output being shown (#1750, #1895).
  • Use the mode of the given IO for IO#reopen(IO) which is important for the 3 standard IOs (#2034).
  • Fix potential deadlock when running finalizers (#2041).
  • Let require 'rubygems/specification' work before require 'rubygems'.

Compatibility:

  • Implement UnboundMethod#bind_call.
  • Implemented ObjectSpace::WeakMap (#1385, #1958).
  • Implemented strtod and ruby_strtod (#2007).
  • Fix detection of #find_type in FFI to ignore MakeMakefile#find_type from mkmf (#1896, #2010).
  • Implemented rb_uv_to_utf8 (#1998, @skateman).
  • Implemented rb_str_cat_cstr.
  • Implemented rb_fstring.
  • Support #refine for Module (#2021, @ssnickolay).
  • Implemented rb_ident_hash_new.
  • Improved the compatibility of Symbol.all_symbols (#2022, @chrisseaton).
  • Implemented rb_enc_str_buf_cat.
  • Implemented rb_int_positive_pow.
  • Implemented rb_usascii_str_new_lit.
  • Define #getch and #getpass on StringIO when io/console is required.
  • Implemented rb_uv_to_utf8 (#1998).
  • Single character IDs now behave more like those in MRI to improve C extension compatibility, so rb_funcall(a, '+', b) will now do the same thing as in MRI.
  • Removed extra public methods on String.
  • Implemented rb_array_sort and rb_array_sort_bang.
  • Do not create a finalizers Thread if there are other public languages, which is helpful for polyglot cases (#2035).
  • Implemented rb_enc_isalnum and rb_enc_isspace.
  • RUBY_REVISION is now the full commit hash used to build TruffleRuby, similar to MRI 2.7+.
  • Implemented rb_enc_mbc_to_codepoint.
  • Changed the lookup methods to achieve Refinements specification (#2033, @ssnickolay)
  • Implemented Digest::Instance#new (#2040).
  • Implemented ONIGENC_MBC_CASE_FOLD.
  • Fixed Thread#raise to call the exception class' constructor with no arguments when given no message (#2045).
  • Fixed refine + super compatibility (#2039, #2048, @ssnickolay)
  • Make the top-level exception handler more compatible with MRI (#2047).
  • Implemented rb_enc_codelen.
  • Implemented Ripper by using the C extension (#1585).

Changes:

  • RubyGems gem commands updated to use the --no-document option by default.

Performance:

  • Enable lazy translation from the parser AST to the Truffle AST for user code by default. This should improve application startup time (#1992).
  • instance variable ... not initialized and similar warnings are now optimized to have no peak performance impact if they are not printed (depends on $VERBOSE).
  • Implement integer modular exponentiation using BigInteger#mod_pow (#1999, @skateman)
  • Fixed a performance issue when computing many substrings of a given non-leaf String with non-US-ASCII characters.
  • Speedup native handle to Ruby object lookup for C extensions.

Don't miss a new truffleruby release

NewReleases is sending notifications on new releases.