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

latest releases: graal-24.0.1, vm-ee-24.0.1, vm-24.0.1...
2 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 File.utime to use nanoseconds (#2448, @bjfish).
  • Capture the intercepted feature path during patching to reuse during patch require (#2441, @bjfish).
  • Update Module#constants to filter invalid constant identifiers (#2452, @bjfish).
  • Fixed -0.0 <=> 0.0 and -0.0 <=> 0 to return 0 like on CRuby (#1391, @eregon).
  • Fixed Range#step to return correct class with begin-less range (@ccocchi, #2516).
  • Fixed exception creation when an Errno is sub-classed (@bjfish, #2521).
  • Fixed String#[]= to use the negotiated encoding (@bjfish, #2545).

Compatibility:

  • Implement rb_sprintf in our format compiler to provide consistent formatting across C standard libraries (@eregon).
  • Update defined? to return frozen strings (#2450, @bjfish).
  • Use compensated summation for {Array,Enumerable}#sum when floating point values are included (@eregon).
  • Module#attr_* methods now return an array of method names (#2498, @gogainda).
  • Fixed Socket#(local|remote)_address to retrieve family and type from the file descriptor (#2444, @larskanis).
  • Add Thread.ignore_deadlock accessor (#2453, @bjfish).
  • Allow Hash#transform_keys to take a hash argument (@ccocchi, #2464).
  • Add Enumerable#grep{_v} optimization for Regexp (#2453, @bjfish).
  • Update IO#write to accept multiple arguments (#2501, @bjfish).
  • Do not warn when uninitialized instance variable is accessed (#2502, @andrykonchin).
  • Remove TRUE, FALSE, and NIL constants like CRuby 3.0 (#2505, @andrykonchin).
  • Symbol#to_proc now returns a lambda like in Ruby 3 (#2508, @andrykonchin).
  • Kernel#lambda now warns if called without a literal block (#2500, @andrykonchin).
  • Implement Hash#except (#2463, @wildmaples).
  • Remove special $SAFE global and related C API methods (#2453, @bjfish).
  • Assigning to a numbered parameter raises SyntaxError (#2506, @andrykonchin).
  • Implement --backtrace-limit option (#2453, @bjfish).
  • Update String methods to return String instances when called on a subclass (#2453, @bjfish).
  • Update String#encode to support the :fallback option (#1391, @aardvark179).
  • Module#alias_method now returns the defined alias as a symbol(#2499, @gogainda).
  • Implement Symbol#name (#2453, @bjfish).
  • Update Module#{public, protected, private, public_class_method, private_class_method} and top-level private and public methods to accept single array argument with a list of method names (#2453, @bjfish).
  • Constants deprecated by Module#deprecate_constant only warn if Warning[:deprecated] is true (@eregon).
  • All Array methods now return Array instances and not subclasses (#2510, @Strech).
  • Integer#zero? overrides Numeric#zero? for optimization (#2453, @bjfish).
  • Default Kernel#eval source file and line to (eval):1 like CRuby 3 (#2453, @aardvark179).
  • Add GC.auto_compact accessors for compatibility (#2453, @bjfish).
  • Update accessing a class variable from the top-level scope to be a RuntimeError (#2453, @bjfish).
  • Update interpolated strings to not be frozen (#2453, @bjfish).
  • Add WERRORFLAG to RbConfig (#2519, @bjfish).
  • Update MatchData methods to return String instances when called on a subclass (#2453, @bjfish).
  • Implement Proc#{==,eql?} (#2453, @bjfish).
  • Implement all StringScanner methods (#2520, @eregon).
  • Handle Kernel#clone(freeze: true) (#2512, @andrykonchin).
  • Relax Fiber#transfer limitations (#2453, @bjfish).
  • Implement Fiber#blocking? like CRuby 3 (#2453, @aardvark179).
  • Sort by default for Dir.{glob,[]} and add sort: keyword argument (#2523, @Strech).
  • Implement rb_str_locktmp and rb_str_unlocktmp (#2524, @bjfish).
  • Update Kernel#instance_variables to return insertion order (@bjfish).
  • Fixed rb_path2class() to not error for a module (#2511, @eregon).
  • Update Kernel#print to print $_ when no arguments are given (#2531, @bjfish).
  • Add category kwarg to Kernel.warn and Warning.warn (#2533, @Strech).
  • Implement GC.{measure_total_time, total_time} and update GC.stat to update provided hash (#2535, @bjfish).
  • Implement Array#slice with ArithmeticSequence (#2526, @ccocchi).
  • Update Hash#each to consistently yield a 2-element array (#2453, @bjfish).
  • Remove Hash#{store, index} methods for compatibility (#2546, @bjfish).
  • Implement more correct conversion of array elements by Array#pack (#2503, #2504, @aardvark179).
  • Update String#split to raise a RangeError when limit is larger than int (@bjfish).

Performance:

  • Regexp objects are now interned in a similar way to symbols (@aardvark179).
  • Improve performance of regexps using POSIX bracket expressions (e.g., [[:lower:]]) matching against ASCII-only strings (#2447, @nirvdrum).
  • String#sub, sub!, gsub, and gsub! have been refactored for better performance (@aardvark179).
  • Don't allocate a MatchData object when Regexp#match? or String#match? is used (#2509, @nirvdrum).
  • Add ENV.except (#2507, @Strech).
  • Fully inline the Integer#+ and Integer#- logic for interpreter speed (#2518, @smarr).
  • Remove unnecessary work in negotiating the encoding to use in a Regexp match (#2522, @nirvdrum).
  • Add new fast paths for encoding negotiation between strings with different encodings, but which match common default cases (#2522, @nirvdrum).
  • Reduce footprint by removing unnecessary nodes for accessing the FrameOnStackMarker (#2530, @smarr).

Changes:

  • TruffleRuby now requires Java 11+ and no longer supports Java 8 (@eregon).

Don't miss a new truffleruby release

NewReleases is sending notifications on new releases.