Skip to content

Releases: oracle/truffleruby

TruffleRuby 24.1.2

21 Jan 14:11
Compare
Choose a tag to compare

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

Bug fixes:

  • Fix Module#name called inside the Module#const_added callback when the module is defined in the top-level scope (#3683, @andrykonchin).
  • Fix duplicated calls of a Module#const_added callback when a module with nested modules is assigned to a constant (@andrykonchin).

TruffleRuby 24.1.1

15 Oct 13:03
Compare
Choose a tag to compare

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

  • Build based on GraalVM for JDK 23.0.1 (24.1.1)

TruffleRuby 24.1.0

17 Sep 12:50
Compare
Choose a tag to compare

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:

Bug fixes:

  • Add missing thread-safe objects write barriers for TruffleRuby::ConcurrentMap (#3179, @eregon).
  • Fix repeated calling of methods Dir#{each,each_child,children} (#3464, @andrykonchin).
  • Fix IO#{wait,wait_readable,wait_writable} methods and switch the current thread into a sleep state (@andrykonchin).
  • Fix rb_global_variable() for Float and bignum values during the Init_ function (#3478, @eregon).
  • Fix rb_gc_register_mark_object() for Float and bignum values (#3502, @eregon, @andrykonchin).
  • Fix parsing literal floats when the locale does not use . for the decimal separator (e.g. LANG=fr_FR.UTF-8) (#3512, @eregon).
  • Fix IO#{read_nonblock,readpartial,sysread}, BasicSocket#{recv,recv_nonblock}, {Socket,UDPSocket}#recvfrom_nonblock, UnixSocket#recvfrom and preserve a provided buffer's encoding (#3506, @andrykonchin).
  • Repair IO#{wait_readable,wait_writable,wait} to be interruptible (#3504, @andrykonchin).
  • Fix Hash value omission for constant names (@andrykonchin).
  • Fix MatchData#[index, length] when index is larger than number of matched values (@andrykonchin).
  • Fix #each for a foreign iterator which is also iterable (#3630, @eregon).

Compatibility:

  • Move IO#wait_readable, IO#wait_writable, IO#wait_priority and IO#wait into core library (@andrykonchin).
  • Change assignment evaluation order for fully qualified constant and evaluate left-hand-side before right-hand-side (#3039, @andrykonchin).
  • Fix evaluation order for multi-assignment and evaluate left-hand-side before right-hand-side (@andrykonchin).
  • Add Regexp.linear_time? method (#3039, @andrykonchin).
  • Allow null encoding pointer in rb_enc_interned_str_cstr (@thomasmarshall).
  • Allow anonymous memberless Struct (@simonlevasseur).
  • Set $! when a Kernel#at_exit hook raises an exception (#3535, @andrykonchin).
  • Support :buffer keyword argument to Array#pack (#3559, @andrykonchin).
  • Set RbConfig::CONFIG['host_cpu'] to arm64 on darwin platform (#3571, @andrykonchin).
  • Fix RegexpError messages to match CRuby better (#3398, @andrykonchin).
  • Fix Enumerable#reduce to handle non-Symbol method name parameter (#2931, @andrykonchin).
  • Fix RangeError message to match CRuby for Integer#chr called with invalid codepoint argument (#2795, @andrykonchin).
  • Joni has been updated from 2.1.44 to 2.2.1 (@andrykonchin).
  • Fix Hash#to_h called with a block and pass key and value to the block as separate arguments (#3607, @andrykonchin).
  • Fix StringIO#initialize and preserve initial string's encoding when mode is w so the initial string is truncated (#3599, @andrykonchin).
  • Fix IO#{autoclose=,autoclose?} and raise IOError when io is closed (@andrykonchin).
  • Fix Thread#{thread_variable_get,thread_variable_set,thread_variable?,key?,[],[]=,fetch} and convert a non-String/Symbol thread-local variable name to String using #to_str (@andrykonchin).
  • Fix formatting in Exception#full_message when RuntimeError is not handled and highlight option is specified (@andrykonchin).
  • Fix String#encode and convert fallback values into String using #to_str (@andrykonchin).
  • Fix Kernel.warn and don't call Warning#warn if a specified category is disabled (@andrykonchin).
  • Fix $! global variable and make it fiber-local (@andrykonchin).
  • Fix rb_set_errinfo and rb_errinfo and store an error separately from $! (#2890, @andrykonchin).
  • Fix rb_mutex_synchronize to not wrap/unwrap result value (#3624, @andrykonchin).
  • Add StringIO#set_encoding_by_bom method (#3632, @andrykonchin).
  • Fix Kernel#eval to ignore shebang with non-Ruby interpreter (#3623, @andrykonchin).
  • Add SyntaxError#path (#3433, @wasabigeek).
  • Reuse the precompiled sass-embedded gem as-is on TruffleRuby (#3565, @ntkme).

Performance:

  • Fix inline caching for Regexp creation from Strings (#3492, @andrykonchin, @eregon).
  • Optimize Integer#pow method for small modulus values (#3544, @andrykonchin).
  • Avoid repeated copies from native to managed string when matching Regexps on a native string (#2193, @eregon).
  • Report polymorphism for Kernel#sprintf (#3537, @nirvdrum).
  • Review all inline caches to appropriately use splitting to make the best use of these inline caches (@andrykonchin, @eregon).

Memory Footprint:

  • Use inlined core method nodes even when modules are prepended to core classes (#3546, @eregon).
  • Reduce empty array allocations (#3517, @nirvdrum).

TruffleRuby 24.0.2

16 Jul 13:51
Compare
Choose a tag to compare

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

  • Build based on GraalVM for JDK 22.0.2 (24.0.2)

TruffleRuby 24.0.1

16 Apr 14:33
Compare
Choose a tag to compare

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

Bug fixes:

  • Fix rb_global_variable() for Float and bignum values during the Init_ function (#3478, @eregon).

Performance:

TruffleRuby 24.0.0

19 Mar 15:00
Compare
Choose a tag to compare

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).

TruffleRuby 23.1.2

16 Jan 14:01
Compare
Choose a tag to compare

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

Bug fixes:

* Fix segfault in Native mode with G1 (only applies to Oracle GraalVM & Linux), graal commit
Unfortunately this was not backported to 23.1.2, it will be fixed in the next release.

Compatibility:

  • Fix problems with the LLVM toolchain wrappers with Xcode 15 on macOS (#3283, #3294).

TruffleRuby 23.1.1

24 Oct 16:06
Compare
Choose a tag to compare

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

  • Build based on latest GraalVM JDK release (23.1.1)

TruffleRuby 23.1.0

19 Sep 12:12
Compare
Choose a tag to compare

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:

  • Updated to Ruby 3.2.2 (#3039, @eregon, @andrykonchin).
  • TruffleRuby Native on Oracle GraalVM on Linux now uses the G1 garbage collector which is much faster (@eregon).

Bug fixes:

  • Fix Dir.glob returning blank string entry with leading **/ in glob and base: argument (@rwstauner).
  • Fix class lookup after an object's class has been replaced by IO#reopen (@itarato, @nirvdrum, @eregon).
  • Fix Marshal.load and raise ArgumentError when dump is broken and is too short (#3108, @andrykonchin).
  • Fix super method lookup for unbounded attached methods (#3131, @itarato).
  • Fix Module#define_method(name, Method) to respect module_function visibility (#3181, @andrykonchin).
  • Fix stack overflow with Kernel.require and zeitwerk (#3224, @eregon).
  • Reimplement IO.select with poll(2) to support file descriptors >= 1024 (#3201, @eregon).

Compatibility:

  • Fix Hash#shift when Hash is empty but has initial default value or initial default proc (#3039, @itarato).
  • Make Array#shuffle produce the same results as CRuby (@rwstauner).
  • Add Process.argv0 method (@andrykonchin).
  • Add support for array pattern matching. This is opt-in via --pattern-matching since pattern matching is not fully supported yet. (#2683, @razetime).
  • Fix Array#[] with ArithmeticSequence argument when step is negative (#3039, @itarato).
  • Fix Range#size and return nil for beginningless Range when end isn't Numeric (#3039, @rwstauner).
  • Alias String#-@ to String#dedup (#3039, @itarato).
  • Fix Pathname#relative_path_from to convert string arguments to Pathname objects (@rwstauner).
  • Add String#bytesplice (#3039, @itarato).
  • Add String#byteindex and String#byterindex (#3039, @itarato).
  • Add implementations of rb_proc_call_with_block, rb_proc_call_kw, rb_proc_call_with_block_kw and rb_funcall_with_block_kw (#3068, @andrykonchin).
  • Add optional timeout argument to Thread::Queue#pop (#3039, @itarato).
  • Add optional timeout argument to Thread::SizedsQueue#pop (#3039, @itarato).
  • Handle long long and aliases in Fiddle (#3128, @eregon).
  • Add Module#refinements (#3039, @itarato).
  • Add Refinement#refined_class (#3039, @itarato).
  • Add rb_hash_new_capa function (#3039, @itarato).
  • Fix Encoding::Converter#primitive_convert and raise FrozenError when a destination buffer argument is frozen (@andrykonchin).
  • Add Module#undefined_instance_methods (#3039, @itarato).
  • Add Thread.each_caller_location (#3039, @itarato).
  • Add timeout argument to Thread::SizedQueue#push (#3039, @itarato).
  • Add rb_syserr_new function (@rwstauner).
  • Add Enumerator#product (#3039, @itarato).
  • Add Module#const_added (#3039, @itarato).
  • Show the pointer size information (if available) in FFI::Pointer#inspect (@nirvdrum).
  • Implement performance warnings (Warning[:performance]) like in CRuby 3.3 (@eregon).
  • The output of Marshal.dump is now compatible with CRuby for Rational and Complex instances (#3228, @eregon).

Performance:

  • Improve Truffle::FeatureLoader.loaded_feature_path by removing expensive string ops from a loop. Speeds up feature lookup time (#3010, @itarato).
  • Improve String#-@ performance by reducing unnecessary data copying and supporting substring lookups (@nirvdrum)
  • Specialize Array#<< and related methods appending elements per call site to have a single array storage strategy in the inline cache for most cases (@eregon).

Changes:

  • gu install $LANGUAGE is replaced by truffleruby-polyglot-get $LANGUAGE, available in the TruffleRuby JVM standalone (@eregon).
  • The TruffleRuby ScriptEngine implementation is removed in favor of the generic ScriptEngine in GraalVM docs (@eregon).

Memory Footprint:

  • Replaced RubyLibrary with FreezeNode and IsFrozenNode (@horakivo).
  • Address many truffle-sharing warnings (@horakivo).
  • Address many truffle-inlining warnings (@horakivo).

TruffleRuby - GraalVM Community 23.0.1

25 Jul 13:02
Compare
Choose a tag to compare

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

  • Build based on latest GraalVM JDK release (23.0.1)