Skip to content

TruffleRuby 23.1.0

Compare
Choose a tag to compare
@ezzarghili ezzarghili released this 19 Sep 12:12
· 1775 commits to master since this release

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