Releases: truffleruby/truffleruby
TruffleRuby 34.0.1
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 in the README.
TruffleRuby comes in two standalone modes, native and jvm, each built with both Oracle GraalVM and Community Edition.
See the documentation for which release asset corresponds to what.
Changelog
Compatibility
TruffleRuby 34.0.0
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 in the README.
TruffleRuby comes in two standalone modes, native and jvm, each built with both Oracle GraalVM and Community Edition.
See the documentation for which release asset corresponds to what.
Blog Post
https://truffleruby.dev/blog/truffleruby-34-is-released
Changelog
New features:
- Updated to Ruby 3.4.9 (#3883, @nirvdrum, @eregon, @andrykonchin).
- Enable JFR event streaming from Ruby (#4111, @lbarasti).
Bug fixes:
- Fix
Integer#ceilandFloat#ceilwith negative precision (#3911, @trinistr). - Update
search_nonascii()to not rely on undefined behavior (#4110, @eregon). - Update to GraalVM & Truffle 25.0.2 (#4116, @eregon).
- Fix
TypeErrorfromKernel#respond_to?to show the class of thenameargument and notself(@eregon). - Fix
superwith methods not accepting keywords likedef foo(**nil)(#4168, @eregon). - Fix potential race conditions when multiple methods of the same file are lazily translated concurrently (#4182, @eregon).
- Fix
IndexOutOfBoundsExceptionhappening on stack overflow (#4193, #4199, @eregon).
Compatibility:
Ripperis now usingPrism::Translation::Ripperinstead of the native extension. This is faster and more reliable because it does not depend on lots of CRuby internals (#3481, @eregon).- Update to Prism 1.9.0 for improved Ripper compatibility (#3481, @eregon).
- Implement
String#append_as_bytesfor Ruby 3.4 (#4087, @Earlopain). - Update error message of
Array#fetchwith key out of range (#4085, @herwinw). - Implement
Array#fetch_valuesfor Ruby 3.4 (#4085, @herwinw). - Remove deprecated
Refinement#refined_classmethod for Ruby 3.4 (#4088, @herwinw). - Update
Hash#inspectfor Ruby 3.4 (#4090, @Earlopain). - Fix
mkmf.rbto use host'sRbConfigfor$rubywhen--target-rbconfigis used (#4097, @panozzaj). - Implement
Fiber.[],Fiber.[]=, andFiber#{storage,storage=}(#4007, @nirvdrum). - Update
Range#sizesemantics for Ruby 3.4 (#4099, @Earlopain). - Keyword splatting
nilis now treated as**{}for Ruby 3.4 (#4100, @Earlopain). - Fix
Symbol#inspectto handle incompatible encodings (#4106, @eregon). Rational#**no longer returns a Float, it will raise an ArgumentError if the result is too big (#4105, @herwinw).- The dummy
Encoding::UTF_16andEncoding::UTF_32encodings are now regular single-byte dummy encodings (#4083, @eregon). - Implement
rb_interned_str()andrb_interned_str_cstr()(#4018, @herwinw). - Define C API var-args and struct-by-value functions as non-inline to support taking their address (#3396, @eregon).
- Implement
GC.config(#3883, @eregon). - Use the
timeoutgem now that it is efficient and uses a single Thread (#3883, @eregon). - Implement
ruby_vm_at_exit(), used byrbs(@eregon). - Fix splatting a
BasicObjectblock parameter whichrespond_to?(:to_ary)(#4129, @eregon). Integer#**no longer returns infinity for large results but either computes the result as an Integer or raises anArgumentError(#4133, @eregon).Hash#to_procreturns a lambda with an arity of 1 (#4138, @herwinw).Hash.[]now raises the correct error message fornil,trueandfalseas argument (#4140, #4146, @herwinw).- Support an
ArrayofThread::Backtrace::LocationinException#set_backtraceand{Kernel,Thread,Fiber}#raise(#3883, @eregon). - Try
#to_arycoercion inArray#assocandArray#rassoc(#4137, @herwinw). - Improve compatibility of
rb_scan_args()with Ruby 3+ changes (@eregon). - Implement
Time#{xmlschema,iso8601}in core like Ruby 3.4 (#3883, @eregon). - Implement
Hash#initialize(capacity:)like Ruby 3.4 (#3883, @eregon). - Use
Hashdefault for#sprintf(#4155, @eregon). - Implement
rb_cloexec_dup(),rb_cloexec_fcntl_dupfd(),rb_enc_check(),rb_str_subpos(),rb_str_offset()andrb_str_sublen()necessary for thereadline-extgem (#3018, @eregon). - Make
rb_*str_new_static()functions use the passed pointer as the String storage like CRuby (#3018, @eregon). - Add support for creating
Floatvalues from strings with the decimal part omitted (#3883, @nirvdrum). - Implement
Method#original_name(#4165, @eregon). - Add
Socket::ResolutionErrorlike Ruby 3.4 (#3883, @eregon). - Support the
resolv_timeoutandfast_fallbackkeyword arguments forTCPSocket.new(#3883, @eregon). require 'readline'now uses eitherRelineor thereadline-extgem, same as CRuby (#3018, @eregon).- Update
Kernel#singleton_methodto implement Ruby 3.4 singleton ancestor lookup semantics (#3883, @nirvdrum). - Rewrite
Range#stepto handle many more cases, including non-Numericstep values using the+-based iteration semantics introduced in Ruby 3.4 (#3883, @nirvdrum). Process.spawnnow raisesErrno::EACCESinstead ofErrno::ENOENTwhen the file exists but is not executable (#4176, @alessandro54).- Support building native extensions on systems that don't follow the Filesystem Hierarchy Standard (FHS), such as NixOS (@nirvdrum).
- Fallback to
/bin/shlike CRuby when the command given toKernel#spawnis not executable (@van-sprundel, #4220).
Performance:
- Speedup parsing by up to 35% by lazily parsing method definitions (#4182, @eregon).
- Use the local variable depth from Prism to speedup translation from Prism AST to TruffleRuby AST (#4188, @eregon).
Incompatible Changes:
TruffleRuby 33.0.1
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 in the README.
TruffleRuby comes in two standalone modes, native and jvm, each built with both Oracle GraalVM and Community Edition.
See the documentation for which release asset corresponds to what.
Changelog
Bug fixes:
Compatibility:
- Fix
mkmf.rbto use host'sRbConfigfor$rubywhen--target-rbconfigis used (#4097, @panozzaj). - Implement
Fiber.[],Fiber.[]=, andFiber#{storage,storage=}(#4007, @nirvdrum). - Fix
Symbol#inspectto handle incompatible encodings (#4106, @eregon). - The dummy
Encoding::UTF_16andEncoding::UTF_32encodings are now regular single-byte dummy encodings (#4083, @eregon).
TruffleRuby 33.0.0
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 in the README.
TruffleRuby comes in two standalone modes, native and jvm, each built with both Oracle GraalVM and Community Edition.
See the documentation for which release asset corresponds to what.
Blog Post
https://truffleruby.dev/blog/truffleruby-33-is-released
Changelog
New features:
Hashis now thread-safe on TruffleRuby, based on Benoit Daloze's PhD research (#3869, #3112, #2763, @eregon).- The TruffleRuby version changed from being based on the GraalVM version to being based on the CRuby version. TruffleRuby version
AB.C.Daims to be compatible with CRubyA.B. See the README for more details (#4020, @eregon). - TruffleRuby now ships with its own
libyamland no longer needs a systemlibyaml(#3479, @eregon). - TruffleRuby now ships with its own
libssland no longer needs a systemlibssl. It still requires CA certificates from the system. (#3479, @eregon).
Bug fixes:
- Fix
Integer#%when called with a bignum argument (#3931, @andrykonchin).
Compatibility:
- Fix extra warnings for
Kernel#sprintf(#3938, @eregon). - Support using tailwindcss-ruby's native platform gems (@nirvdrum).
- Fix a
TypeErrorwhen callingKernel#warnwith explicituplevel: nil(@Earlopain). - Fix inspect output of symbols that contain non-ASCII letters (@Earlopain).
- Implement
rb_struct_initialize()for bothStructandData(#3997, @eregon). - Fix
Hash#{select,slice,transform_values}andHash.[]methods and retaincompare_by_identityflag (@andrykonchin). - Fix
Hash#rejectand do not retaindefaultanddefault_procvalues (@andrykonchin). - Fix
Comparable#clampwhen the given an infinite interval (#3945, @andrykonchin). File.pathnow checks for\0and encoding (#4047, @nobu).- Implement
MatchData#bytebeginandMatchData#byteendfor Ruby 3.4 (#3883, @Schwad). - Define
Data#initializeto help deserializing Data instances (@eregon). - Fix
Rational()and arguments type conversion (#3969, #3954 @andrykonchin). - Support
Rational()withexceptionkeyword argument (#3969, @andrykonchin). - Ignore
bom|prefix if file is not opened for reading (#4079, @rwstauner).
Incompatible Changes:
- Maven coordinates to embed TruffleRuby have changed from
org.graalvm.polyglot:ruby/org.graalvm.ruby:rubytodev.truffleruby:truffleruby(#4034, @eregon). - The
--single-threadedoption now defaults to false also when embedding TruffleRuby (#3958, @eregon).
Other contributions without Changelog entries
- Add Dockerfiles and GitHub Actions to generate and publish docker images (#2405, @flavorjones).
- Fix invalid inlining usage of BooleanCastNode (#4043, @chumer).
TruffleRuby 25.0.0
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 in the README.
TruffleRuby comes in two standalone modes, native and jvm, each built with both Oracle GraalVM and Community Edition.
See the documentation for which release asset corresponds to what.
Changelog
New features:
- Run C extensions marked as
rb_ext_ractor_safe()orrb_ext_thread_safe()in parallel (without the C extension lock) (#2136, @eregon).
Bug fixes:
- Fix
Range#cover?on begin-less ranges and non-integer values (@nirvdrum, @rwstauner). - Fix
Time.newwith String argument and handle nanoseconds correctly (#3836, @andrykonchin). - Fix a possible case of infinite recursion when implementing
frozen?in a native extension (@nirvdrum). - Fix parameters forwarding to a method call executed with
Kernel#eval(@andrykonchin). - Fix segfaults in native extensions when the reference processing thread is interrupted and would
longjmp()incorrectly (#3903, @eregon).
Compatibility:
- Support Timezone argument to
Time.{new,at}andTime#{getlocal,localtime}(#1717, @patricklinpl, @manefz, @rwstauner). - Updated to Ruby 3.3.7 (@andrykonchin).
- Implement
StringScanner#{peek_byte,scan_byte,scan_integer,named_captures}methods (#3788, @andrykonchin). - Support String patterns in
StringScanner#{exist?,scan_until,skip_until,check_until,search_full}methods (@andrykonchin). - Implement
ObjectSpace::WeakKeyMap(#3681, @andrykonchin). - Fix
String#slicecalled with negative offset (@andrykonchin). - Fix explicitly inherited
Structsubclasses and don't provide#membersmethod (#3802, @andrykonchin). - Support Digest plugins (#1390, @nirvdrum).
- Joni has been updated from 2.2.1 to 2.2.6 (@andrykonchin).
- Fix numeric coercing when
#coercemethod is not public (#3848, @andrykonchin). - Fix
Kernel#raiseand don't overridecauseat exception re-raising (#3831, @andrykonchin). - Return a pointer with
#type_sizeof 1 forPointer#read_pointer(@eregon). - Fix
rb_str_locktmp()andrb_str_unlocktmp()to raiseFrozenErrorwhen string argument is frozen (#3752, @andrykonchin). - Fix Struct setters to raise
FrozenErrorwhen a struct is frozen (#3850, @andrykonchin). - Fix
Struct#initializewhen mixed positional and keyword arguments (#3855, @andrykonchin). - Fix
Integer.sqrtfor large values (#3872, @tompng). - Fix
Data#inspectwhen data contains a recursive attribute (#3847, @andrykonchin). - Fix
StringIO#{gets,readline}when it is called with both separator and limit to truncate the separator if the limit is exceeded (#3856, @andrykonchin). - Implement
rb_error_frozen_objectfor the google-protobuf gem (@nirvdrum). - Adjust a
FrozenError's message and add a receiver when a frozen module or class is modified (e.g. by defining or undefining an instance method or by defining a nested module (@andrykonchin). - Fix
Kernel#sprintfand%pformat specification to produce"nil"fornilargument (#3846, @andrykonchin). - Reimplement
Data#withto not callData.newthat can be removed or redefined (#3890, @andrykonchin).
Performance:
TruffleRuby 24.2.2
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.
Changes:
- Update GraalVM base to 24.2.2
TruffleRuby 24.2.1
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.3.7 (@andrykonchin).
TruffleRuby 24.2.0
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.3.5 (#3681, @andrykonchin, @eregon).
Bug fixes:
- Fix
Module#namecalled inside theModule#const_addedcallback when the module is defined in the top-level scope (#3683, @andrykonchin). - Fix duplicated calls of a
Module#const_addedcallback when a module with nested modules is assigned to a constant (@andrykonchin). - Support OpenSSL 1.1-3.4 and prefer in order OpenSSL 3.0.x, 3.x and 1.1 (EOL). There was a compilation issue with OpenSSL 3.4 (#3724, @eregon).
- Fix
Time{.at,.new,.now,#getlocal,#localtime}methods and validation of seconds in utc offset in String format (@andrykonchin). - Fix
ObjectSpace.undefine_finalizerand raiseFrozenErrorwhen called for a frozen object (@andrykonchin). - Fix
Integer#/when called with a bignum argument (@andrykonchin).
Compatibility:
- Fix
Module#includeso a module included into a reopened nested module is added into an ancestors chain (#3570, @andrykonchin). - Fix
Kernel#evalto ignore shebang with non-Ruby interpreter (#3623, @andrykonchin). - Fix
Env#deleteand return value returned by a block if variable doesn't exist (@andrykonchin). - Fix
Env#updateand accept multiple hashes (@andrykonchin). - Add
MAJOR,MINOR,TEENY,PATCHLEVEL,RUBY_API_VERSION, andRUBY_PROGRAM_VERSIONtoRbConfig::CONFIG(#3396, @rwstauner). - Set
RbConfig::CONFIG['archincludedir'](#3396, @andrykonchin). - Support the index/length arguments for the string argument to
String#bytespliceadded in 3.3 (#3656, @rwstauner). - Implement
rb_str_strlen()(#3697, @Th3-M4jor). - Support
Time.newwith String argument and error when invalid (#3693, @rwstauner). - Implement
rb_enc_interned_str()(#3703, @Th3-M4jor). - Implement
rb_hash_bulk_insert()(#3705, @Th3-M4jor). - Remove deprecated
Pathname#{taint,untaint}methods (#3681, @andrykonchin). - Add
rb_category_warnfunction (#3710, @andrykonchin). - Add
rb_gc_mark_locations()(#3704, @andrykonchin). - Implement
rb_str_format()(#3716, @andrykonchin). - Add
IO#{pread, pwrite}methods (#3718, @andrykonchin). - Add
rb_io_closed_p()(#3681, @andrykonchin). - Add
rb_io_open_descriptor()(#3681, @andrykonchin). - Support serializing of
Datainstances into Marshal format (#3726, @andrykonchin). Array#packnow raisesArgumentErrorfor unknown directives (#3681, @Th3-M4jor).String#unpacknow raisesArgumentErrorfor unknown directives (#3681, @Th3-M4jor).Thread::Queue#freezenow raisesTypeErrorwhen called (#3681, @Th3-M4jor).Thread::SizedQueue#freezenow raisesTypeErrorwhen called (#3681, @Th3-M4jor).- Add
Range#reverse_each(#3681, @andrykonchin). - Emit a warning when
itcall without arguments is used in a block without parameters (#3681, @andrykonchin). - Add
rb_syserr_fail_str()(#3732, @andrykonchin). - Add
Dir.for_fd(#3681, @andrykonchin). - Add
Dir.fchdir(#3681, @andrykonchin). - Add
Dir#chdir(#3681, @andrykonchin). - Declare
File::SHARE_DELETEconstant (#3745, @andrykonchin). - Support
symbolize_namesargument toMatchData#named_captures(#3681, @rwstauner). - Support
Proc#initialize_{dup,copy}for subclasses (#3681, @rwstauner). - Remove deprecated
Encoding#replicatemethod (#3681, @rwstauner). - Add
ObjectSpace::WeakMap#delete(#3681, @andrykonchin). Kernel#lambdawith now raisesArgumentErrorwhen given a non-lambda, non-literal block (#3681, @Th3-M4jor).- Add
rb_data_define()to define Data (#3681, @andrykonchin). - Add
Refinement#target(#3681, @andrykonchin). - Add
Range#overlap?(#3681, @andrykonchin). - Update
NoMethodError#messageto not use#inspecton receiver (#3681, @rwstauner). - Socket
#recv*methods ({BasicSocket,IPSocket,TCPSocket,UDPSocket,Socket}#{recv,recv_nonblock,recvmsg,recvmsg_nonblock,recvfrom,recvfrom_nonblock}) returnnilinstead of an empty String on closed connections (#3681, @andrykonchyn). - Fix
Marshal.dumpwhen a Float value is dumped repeatedly (#3747, @andrykochin). - Emit warning when
Kernel#formatcalled with excessive arguments (@andrykonchin). - Fix
Integer#ceilwhen self is 0 (@andrykonchin). - Fix
Module#remove_constand emit warning when constant is deprecated (@andrykonchin). - Add
Module#set_temporary_name(#3681, @andrykonchin). - Modify
Float#roundto match MRI behavior (#3676, @andrykonchin).
Performance:
- Speedup some C extensions like
sqlite3,trilogyandjsonby 2 to 3 times by using the Panama NFI backend for faster upcalls in JVM mode (@eregon). - Optimize encoding negotiation for ASCII-compatible encodings (@eregon, @andrykonchin).
Changes:
- Inherit
Polyglot::ForeignExceptionfromStandardErrorinstead ofException(#3620, @andrykonchin).
TruffleRuby 24.1.2
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#namecalled inside theModule#const_addedcallback when the module is defined in the top-level scope (#3683, @andrykonchin). - Fix duplicated calls of a
Module#const_addedcallback when a module with nested modules is assigned to a constant (@andrykonchin).
TruffleRuby 24.1.1
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)