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

latest releases: graal-24.1.1, graal-24.1.0, vm-ee-24.1.0...
3 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.
The Ruby language component can be added to GraalVM using the gu utility.
More information is available on the website: http://www.graalvm.org/ruby/

Changelog

New features:

Bug fixes:

  • Fix of different values of self in different scopes.
  • Truffle::POSIX.select was being redefined repeatedly (#2332, @eregon).
  • Fix the --backtraces-raise and --backtraces-rescue options in JVM mode (#2335).
  • Fix File.{atime, mtime, ctime} to include nanoseconds (#2337).
  • Fix Array#[a, b] = "frozen string literal".freeze (#2355).
  • rb_funcall() now releases the C-extension lock (similar to MRI).
  • Fix rb_str_modify_expand to preserve existing bytes (#2392).
  • Fix Marshal.load of multiple Symbols with an explicit encoding (#1624).
  • Fix String#scrub when replacement is frozen (#2398, @LillianZ).

Compatibility:

  • Updated to Ruby 2.7.3. The resolv stdlib was not updated (resolv in 2.7.3 has bugs).
  • Make interpolated strings frozen for compatibility with Ruby 2.7 (#2304, @kirs).
  • require 'socket' now also requires 'io/wait' like CRuby (#2326).
  • Support precision when formatting strings (#2281, @kirs).
  • Make rpartition compatible with Ruby 2.7 (#2320, @gogainda).
  • Include the type name in exception messages from rb_check_type (#2307).
  • Fix Hash#rehash to remove duplicate keys after modifications (#2266, @MattAlp)
  • Only fail rb_check_type for typed data, not wrapped untyped structs (#2331, @aardvark179).
  • Decide the visibility in Module#define_method based on self and the default definee (#2334).
  • Configure mandir value in RbConfig::CONFIG and RbConfig::MAKEFILE_CONFIG (#2315, @bjfish).
  • TruffleRuby now supports the Truffle polyglot Hash interop API (@norswap).
  • Implement Fiber#raise (#2338).
  • Update File.basename to return new String instances (#2343).
  • Allow Fiber#raise after Fiber#transfer like Ruby 3.0 (#2342).
  • Fix ObjectSpace._id2ref for Symbols and frozen String literals (#2358).
  • Implemented Enumerator::Lazy#filter_map (#2356).
  • Fix LLVM toolchain issue on macOS 11.3 (#2352, oracle/graal#3383).
  • Implement IO#set_encoding_by_bom (#2372, pawandubey).
  • Implemented Enumerator::Lazy#with_index (#2356).
  • Implement rb_backref_set.
  • Fix Float#<=> when comparing Infinity to other #infinite? values.
  • Implement date library as a C extension to improve compatibility (#2344).
  • Update rb_str_modify and rb_str_modify_expand to raise a FrozenError when given a frozen string (#2392).

Performance:

  • Make #dig iterative to make it faster and compile better for calls with 3+ arguments (#2301, @chrisseaton, @jantnovi).
  • Make Struct#dig faster in interpreter by avoiding exceptions (#2306, @kirs).
  • Reduce the number of AST nodes created for methods and blocks (#2261).
  • Fiber-local variables are much faster now by using less synchronization.
  • Improved the performance of the exceptional case of String#chr (#2318, @chrisseaton).
  • Improved the performance of IO#read_nonblock when no data is available to be read.
  • TruffleSafepoint is now used instead of custom logic, which no longer invalidates JITed code for guest safepoints (e.g., Thread#{backtrace,raise,kill}, ObjectSpace, etc)
  • Significantly improved performance of Time#strftime for common formats (#2361, @wildmaples, @chrisseaton).
  • Faster solution for lazy integer length (#2365, @lemire, @chrisseaton).
  • Speedup rb_funcallv*() by directly unwrapping the C arguments array instead of going through a Ruby Array (#2089).

Changes:

  • rb_iterate() (deprecated since 1.9) no longer magically passes the block to rb_funcall(), use rb_block_call() instead.

Security:

Don't miss a new truffleruby release

NewReleases is sending notifications on new releases.