Skip to content

Releases: oracle/truffleruby

TruffleRuby - GraalVM Community Edition 1.0 RC16

19 Apr 15:34
Compare
Choose a tag to compare

Bug fixes:

  • Fixed Hash#merge with no arguments to return a new copy of the receiver (#1645).
  • Fixed yield with a splat and keyword arguments (#1613).
  • Fixed rb_scan_args to correctly handle kwargs in combination with optional args.
  • Many fixes for FFI::Pointer to be more compatible with the ffi gem.

New features:

  • Rounding modes have been implemented or improved for Float, Rational, BigDecimal (#1509).
  • Support Homebrew installed in other prefixes than /usr/local (#1583).
  • Added a pure-Ruby implementation of FFI which passes almost all Ruby FFI specs (#1529, #1524).

Changes:

  • Support for the Darkfish theme for RDoc generation has been removed.

Compatibility:

  • The KeyError raised from ENV#fetch and Hash#fetch now matches MRI's message formatting (#1633).
  • Add the missing key and receiver values to KeyError raised from ENV#fetch.
  • String#unicode_normalize has been moved to the core library like in MRI.
  • StringScanner will now match a regexp beginning with ^ even when not scanning from the start of the string.
  • Module#define_method is now public like in MRI.
  • Kernel#warn now supports the uplevel: keyword argument.

TruffleRuby - GraalVM Community Edition 1.0 RC15

05 Apr 16:14
Compare
Choose a tag to compare

Bug fixes:

  • Improved compatibility with MRI's Float#to_s formatting (#1626).
  • Fixed String#inspect when the string uses a non-UTF-8 ASCII-compatible encoding and has non-ASCII characters.
  • Fixed puts for strings with non-ASCII-compatible encodings.
  • rb_protect now returns Qnil when an error occurs.
  • Fixed a race condition when using the interpolate-once (/o) modifier in regular expressions.
  • Calling StringIO#close multiple times no longer raises an exception (#1640).
  • Fixed a bug in include file resolution when compiling C extensions.

New features:

  • Process.clock_getres has been implemented.

Changes:

  • debug, profile, profiler, which were already marked as unsupported, have been removed.
  • Our experimental JRuby-compatible Java interop has been removed - use Polyglot and Java instead.
  • The Trufle handle patches applied to psych C extension have now been removed.
  • The rb_tr_handle_* functions have been removed as they are no longer used in any C extension patches.

Bug fixes:

  • autoload :C, "path"; require "path" now correctly triggers the autoload.
  • Fixed UDPSocket#bind to specify family and socktype when resolving address.
  • The shell standard library can now be require-d.
  • Fixed a bug where for could result in a NullPointerException when trying to assign the iteration variable.
  • Existing global variables can now become aliases of other global variables (#1590).

Compatibility:

  • ERB now uses StringScanner and not the fallback, like on MRI. As a result strscan is required by require 'erb' (#1615).
  • Yield different number of arguments for Hash#each and Hash#each_pair based on the block arity like MRI (#1629).
  • Add support for the base keyword argument to Dir.{[], glob}.

TruffleRuby - GraalVM Community Edition 1.0 RC14

05 Apr 13:17
Compare
Choose a tag to compare

Updated to Ruby 2.6.2.

Bug fixes:

  • Implement rb_io_wait_writable (#1586).
  • Fixed error when using arrows keys first within irb or pry (#1478, #1486).
  • Coerce the right hand side for all BigDecimal operations (#1598).
  • Combining multiple ** arguments containing duplicate keys produced an incorrect hash. This has now been fixed (#1469).
  • IO#read_nonblock now returns the passed buffer object, if one is supplied.
  • Worked out autoloading issue (#1614).

New features:

  • Implemented String#delete_prefix, #delete_suffix, and related methods.
  • Implemented Dir.children and Dir#children.
  • Implemented Integer#sqrt.

Changes:

  • -Xoptions has been removed - use --help:languages instead.
  • -Xlog= has been removed - use --log.level= instead.
  • -J has been removed - use --vm. instead.
  • -J-cp lib.jar and so on have removed - use --vm.cp=lib.jar or --vm.classpath=lib.jar instead.
  • --jvm. and --native. have been deprecated, use --vm. instead to pass VM options.
  • -Xoption=value has been removed - use --option=value instead.
  • The -X option now works as in MRI.
  • --help:debug is now --help:internal.
  • ripper is still not implemented, but the module now exists and has some methods that are implemented as no-ops.

TruffleRuby - GraalVM Community Edition 1.0 RC13

05 Mar 15:30
Compare
Choose a tag to compare

Note that as TruffleRuby RC 13 is built on Ruby 2.4.4 it is still vulnerable to CVE-2018-16395.
This will be fixed in the next release.

New features:

  • Host interop with Java now works on SubstrateVM too.

Bug fixes:

  • Fixed Enumerator::Lazy which wrongly rescued StandardError (#1557).
  • Fixed several problems with Numeric#step related to default arguments, infinite sequences, and bad argument types (#1520).
  • Fixed incorrect raising of ArgumentError with Range#step when at least one component of the Range is Float::INFINITY (#1503).
  • Fixed the wrong encoding being associated with certain forms of heredoc strings (#1563).
  • Call #coerce on right hand operator if BigDecimal is the left hand operator (#1533).
  • Fixed return type of division of Integer.MIN_VALUE and Long.MIN_VALUE by -1 (#1581).
  • Exception#cause is now correctly set for internal exceptions (#1560).
  • rb_num2ull is now implemented as well as being declared in the ruby.h header (#1573).
  • rb_sym_to_s is now implemented (#1575).
  • R_TYPE_P now returns the type number for a wider set of Ruby objects (#1574).
  • rb_fix2str has now been implemented.
  • rb_protect will now work even if NilClass#== has been redefined.
  • BigDecimal has been moved out of the Truffle module to match MRI.
  • StringIO#puts now correctly handles to_s methods which do not return strings (#1577).
  • Array#each now behaves like MRI when the array is modified (#1580).
  • Clarified that $SAFE can never be set to a non-zero value.
  • Fix compatibility with RubyGems 3 (#1558).
  • Kernel#respond_to? now returns false if a method is protected and the include_all argument is false (#1568).

Changes:

  • TRUFFLERUBY_CEXT_ENABLED is no longer supported and C extensions are now always built, regardless of the value of this environment variable.
  • Getting a substring of a string created by a C extension now uses less memory as only the requested portion will be copied to a managed string.
  • -Xoptions has been deprecated and will be removed - use --help:languages instead.
  • -Xlog= has been deprecated and will be removed - use --log.level= instead.
  • -J has been deprecated and will be removed - use --jvm. instead.
  • -J-cp lib.jar and so on have been deprecated and will be removed - use --jvm.cp=lib.jar or --jvm.classpath=lib.jar instead.
  • -J-cmd, --jvm.cmd, JAVA_HOME, JAVACMD, and JAVA_OPTS do not work in any released configuration of TruffleRuby, so have been removed.
  • -Xoption=value has been deprecated and will be removed - use --option=value instead.
  • TracePoint now raises an ArgumentError for unsupported events.
  • TracePoint.trace and TracePoint#inspect have been implemented.

Compatibility:

  • Improved the exception when an -S file isn't found.
  • Removed the message from exceptions raised by bare raise to better match MRI (#1487).
  • TracePoint now handles the :class event.

Performance:

  • Sped up String handling in native extensions, quite substantially in some cases, by reducing conversions between native and managed strings and allowing for mutable metadata in native strings.

TruffleRuby - GraalVM Community Edition 1.0 RC12

04 Feb 13:38
Compare
Choose a tag to compare

Bug fixes:

  • Fixed a bug with String#lines and similar methods with multibyte
    characters (#1543).
  • Fixed an issue with String#{encode,encode!} double-processing strings
    using XML conversion options and a new destination encoding (#1545).
  • Fixed a bug where a raised cloned exception would be caught as the
    original exception (#1542).
  • Fixed a bug with StringScanner and patterns starting with ^ (#1544).
  • Fixed Enumerable::Lazy#uniq with infinite streams (#1516).

Compatibility:

  • Change to a new system for handling Ruby objects in C extensions which
    greatly increases compatibility with MRI.
  • Implemented BigDecimal#to_r (#1521).
  • Symbol#to_proc now returns -1 like on MRI (#1462).

TruffleRuby - GraalVM Community Edition 1.0 RC11

15 Jan 09:42
Compare
Choose a tag to compare

New features:

  • macOS clocks CLOCK_MONOTONIC_RAW, _MONOTONIC_RAW_APPROX, _UPTIME_RAW,
    _UPTIME_RAW_APPROX, and _PROCESS_CPUTIME_ID have been implemented (#1480).
  • TruffleRuby now automatically detects native access and threading permissions
    from the Context API, and can run code with no permissions given (Context.create()).

Bug fixes:

  • FFI::Pointer now does the correct range checks for signed and unsigned values.
  • Allow signal 0 to be used with Process.kill (#1474).
  • IO#dup now properly sets the new IO instance to be close-on-exec.
  • IO#reopen now properly resets the receiver to be close-on-exec.
  • StringIO#set_encoding no longer raises an exception if the underlying
    String is frozen (#1473).
  • Fix handling of Symbol encodings in Marshal#dump and Marshal#load (#1530).

Compatibility:

  • Implemented Dir.each_child.
  • Adding missing support for the close_others option to exec and spawn.
  • Implemented the missing MatchData#named_captures method (#1512).

Changes:

  • Process::CLOCK_ constants have been given the same value as in standard
    Ruby.

Performance:

  • Sped up accesses to native memory through FFI::Pointer.
  • All core files now make use of frozen String literals, reducing the number
    of String allocations for core methods.
  • New -Xclone.disable option to disable all manual cloning.

TruffleRuby - GraalVM Community Edition 1.0 RC10

05 Dec 18:14
Compare
Choose a tag to compare

New features:

  • The nkf and kconv standard libraries were added (#1439).
  • Mutex and ConditionVariable have a new fast path for acquiring locks
    that are unlocked.
  • Queue and SizedQueue, #close and #closed?, have been implemented.
  • Kernel#clone(freeze) has been implemented (#1454).
  • Warning.warn has been implemented (#1470).
  • Thread.report_on_exception has been implemented (#1476).
  • The emulation symbols for Process.clock_gettime have been implemented.

Bug fixes:

  • Added rb_eEncodingError for C extensions (#1437).
  • Fixed race condition when creating threads (#1445).
  • Handle exception: false for IO#write_nonblock (#1457).
  • File.expand_path now raises an exception for a non-absolute user-home.
  • ArgumentError messages now better match MRI (#1467).
  • Added support for :float_millisecond, :millisecond, and
    :second time units to Process.clock_gettime (#1468).
  • Fixed backtrace of re-raised exceptions (#1459).
  • Updated an exception message in Psych related to loading a non-existing
    class so that it now matches MRI.
  • Fixed a JRuby-style Java interop compatibility issue seen in test-unit.
  • Fixed problem with calling warn if $stderr has been reassigned.
  • Fixed definition of RB_ENCODING_GET_INLINED (#1440).

Changes:

  • Timezone messages are now logged at CONFIG level, use -Xlog=CONFIG to
    debug if the timezone is incorrectly shown as UTC.

TruffleRuby - GraalVM Community Edition 1.0 RC9

05 Nov 13:37
Compare
Choose a tag to compare

Security:

  • CVE-2018-16396, tainted flags are not propagated in Array#pack and String#unpack with some directives has been mitigated by adding additional taint operations.

New features:

  • LLVM for Oracle Linux 7 can now be installed without building from source.

Bug fixes

  • Times can now be created with UTC offsets in +/-HH:MM:SS format.
  • Proc#to_s now has ASCII-8BIT as its encoding instead of the incorrect UTF-8.
  • String#% now has the correct encoding for UTF-8 and US-ASCII format strings, instead of the incorrect ASCII-8BIT.
  • Updated BigDecimal#to_s to use e instead of E for exponent notation.
  • Fixed BigDecimal#to_s to allow f as a format flag to indicate conventional floating point notation. Previously only F was allowed.

Changes:

  • The supported version of LLVM for Oracle Linux has been updated from 3.8 to 4.0.
  • mysql2 is now patched to avoid a bug in passing NULL to rb_scan_args, and now passes the majority of its test suite.
  • The post-install script now automatically detects if recompiling the OpenSSL C extension is needed. The post-install script should always be run in TravisCI as well, see doc/user/standalone-distribution.md.
  • Detect when the system libssl is incompatible more accurately and add instructions on how to recompile the extension.

TruffleRuby - GraalVM Community Edition 1.0 RC8

19 Oct 19:13
Compare
Choose a tag to compare

TruffleRuby is high performance implementation of the Ruby programming language, compatible with MRI 2.4.4.

TruffleRuby is progressing fast but is currently probably not ready for you to try running your full Ruby application on. However it is ready for experimentation and curious end-users to try on their gems and smaller applications.

TruffleRuby runs Rails, and passes the majority of the Rails test suite. But it is missing support for Nokogiri and ActiveRecord database drivers which makes it not practical to run real Rails applications at the moment.

The Ruby language components can be installed in GraalVM using the gu utility.

Release Notes

New features:

  • Java.synchronized(object) { } and TruffleRuby.synchronized(object) { }
    methods have been added.
  • Added a TruffleRuby::AtomicReference class.
  • Ubuntu 18.04 LTS is now supported.
  • macOS 10.14 (Mojave) is now supported.

Changes:

  • Random seeds now use Java's NativePRNGNonBlocking.
  • The supported version of Fedora is now 28, upgraded from 25.
  • The FFI gem has been updated from 1.9.18 to 1.9.25.
  • JCodings has been updated from 1.0.30 to 1.0.40.
  • Joni has been updated from 2.1.16 to 2.1.25.

Performance

  • Performance of setting the last exception on a thread has now been improved.

TruffleRuby - GraalVM Community Edition 1.0 RC7

03 Oct 11:05
Compare
Choose a tag to compare

TruffleRuby is high performance implementation of the Ruby programming language, compatible with MRI 2.4.4.

TruffleRuby is progressing fast but is currently probably not ready for you to try running your full Ruby application on. However it is ready for experimentation and curious end-users to try on their gems and smaller applications.

TruffleRuby runs Rails, and passes the majority of the Rails test suite. But it is missing support for Nokogiri and ActiveRecord database drivers which makes it not practical to run real Rails applications at the moment.

The Ruby language components can be installed in GraalVM using the gu utility.

Release Notes

New features:

  • Useful inspect strings have been added for more foreign objects.
  • The C extension API now defines a preprocessor macro TRUFFLERUBY.
  • Added the rbconfig/sizeof native extension for better MRI compatibility.
  • Support for pg 1.1. The extension now compiles successfully, but
    may still have issues with some datatypes.

Bug fixes:

  • readline can now be interrupted by the interrupt signal (Ctrl+C). This fixes
    Ctrl+C to work in IRB.
  • Better compatibility with C extensions due to a new "managed struct" type.
  • Fixed compilation warnings which produced confusing messages for end users (#1422).
  • Improved compatibility with Truffle polyglot STDIO.
  • Fixed version check preventing TruffleRuby from working with Bundler 2.0 and
    later (#1413).
  • Fixed problem with Kernel.public_send not tracking its caller properly (#1425).
  • rb_thread_call_without_gvl() no longer holds the C-extensions lock.
  • Fixed caller_locations when called inside method_added.
  • Fixed mon_initialize when called inside initialize_copy (#1428).
  • Mutex correctly raises a TypeError when trying to serialize with Marshal.dump.

Performance:

  • Reduced memory footprint for private/internal AST nodes.
  • Increased the number of cases in which string equality checks will become
    compile-time constants.
  • Major performance improvement for exceptional paths where the rescue body
    does not access the exception object (e.g., x.size rescue 0).

Changes:

  • Many clean-ups to our internal patching mechanism used to make some native
    extensions run on TruffleRuby.
  • Removed obsoleted patches for Bundler compatibility now that Bundler 1.16.5
    has built-in support for TruffleRuby.
  • Reimplemented exceptions and other APIs that can return a backtrace to use
    Truffle's lazy stacktraces API.