A high performance implementation of the Ruby programming language, built on GraalVM.
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.
rb_global_variable()
for Float
and bignum values during the Init_
function (#3478, @eregon).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.
rb_enc_left_char_head()
so it is not always ArgumentError
(#3267, @eregon).IO.copy_stream
with a Tempfile
destination (#3280, @eregon).Regexp.union
negotiating the wrong result encoding (#3287, @nirvdrum, @simonlevasseur).Proc#parameters
and return all the numbered parameters lower than the used explicitly ones (@andrykonchin).IO.select([io], nil, [io])
on macOS, it was hanging due to a bug in macOS poll(2)
(#3346, @eregon, @andrykonchin).SignalException
and Interrupt
escape (@eregon).case
target expression correctly (#3377, @eregon).Thread.new(*args, &block)
need to be marked as shared between multiple threads (#3179, @eregon).Range#bsearch
and raise TypeError
when range boundaries are non-numeric and block not passed (@andrykonchin).--cpusampler
profiler when there are custom unblock functions for rb_thread_call_without_gvl()
(#3013, @eregon).FrozenError
exception when redefined #inspect
modifies an object (#3388, @andrykonchin).Integer#div
returning the wrong object type when the divisor is a Rational
(@simonlevasseur, @nirvdrum).Random::DEFAULT
(#3039, @patricklinpl)Exception#detailed_message
method (#3257, @andrykonchin).rb_enc_vsprintf
and force String encoding instead of converting it (@andrykonchin).rb_gc_mark_movable
function (@andrykonchin).File#path
and File#to_path
to IO#path
and IO#to_path
and make IO#new accept an optional path:
keyword argument (#3039, @moste00)RuntimeError
instances with an empty message (#3255, @nirvdrum).RbConfig::CONFIG['configure_args']
for openssl and libyaml (#3170, #3303, @eregon).Socket.sockaddr_in(port, Socket::INADDR_ANY)
(#3361, @mtortonesi).Data
class from Ruby 3.2 (#3039, @moste00, @eregon).Coverage.start
and Coverage.result
accept parameters (#3149, @mtortonesi, @andrykonchin).rb_check_funcall()
(@eregon).MatchData#{byteoffset,deconstruct,deconstruct_keys}
from Ruby 3.2 (#3039, @rwstauner).Integer#ceildiv
method (#3039, @simonlevasseur, @nirvdrum).Class#attached_object
method (#3039, @andrykonchin).ENV#{clone,dup}
and raise TypeError
(#3039, @andrykonchin).Coverage.supported?
and raise TypeError
if argument is not Symbol (#3039, @andrykonchin).Regexp.{new,compile}
of String and warn for unknown types (#3039, @rwstauner).Time#deconstruct_keys
from Ruby 3.2 (#3039, @rwstauner).Struct.new
(#3039, @rwstauner).Set
class to core library (#3039, @andrykonchin).connect_timeout
keyword argument to TCPSocket.{new,open}
(#3421, @manefz, @patricklinpl, @nirvdrum, @rwstauner).File.lutime
and Pathname#lutime
methods (#3039, @andrykonchin).Encoding#replicate
(#3039, @patricklinpl, @manefz, @nirvdrum).UnboundMethod#{==,inspect}
to use the owner module rather than the origin (#3039, @rwstauner, @manefz, @patricklinpl)lambda
keyword argument in Proc#parameters
(#3039, @thomasmarshall, @goyox86).Dir.exists?
, File.exists?
, and Kernel#=~
(#3039, @patricklinpl, @nirvdrum).FileTest.exists?
method (#3039, @andrykonchin).*
, **
and &
names for anonymous parameters (@andrykonchin).Fixnum
and Bignum
constants (#3039, @andrykonchin).rb_enc_interned_str_cstr
function (#3408, @goyox86, @thomasmarshall).rb_str_to_interned_str
function (#3408, @thomasmarshall).Hash
representation from traditional buckets to a "compact hash table" for improved locality, performance and memory footprint (#3172, @moste00).ruby2_keywords
forwarding by deciding it per call site instead of per callee thanks to my fix in CRuby 3.2 (@eregon).:string
arguments to a FFI call and used later for Regexp matching (#3293, @eregon).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.
rb_enc_left_char_head()
so it is not always ArgumentError
(#3267, @eregon).IO.copy_stream
with a Tempfile
destination (#3280, @eregon).Regexp.union
negotiating the wrong result encoding (#3287, @nirvdrum, @simonlevasseur).~* 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.
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.
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.
Dir.glob
returning blank string entry with leading **/
in glob and base:
argument (@rwstauner).IO#reopen
(@itarato, @nirvdrum, @eregon).Marshal.load
and raise ArgumentError
when dump is broken and is too short (#3108, @andrykonchin).super
method lookup for unbounded attached methods (#3131, @itarato).Module#define_method(name, Method)
to respect module_function
visibility (#3181, @andrykonchin).Kernel.require
and zeitwerk
(#3224, @eregon).IO.select
with poll(2)
to support file descriptors >= 1024 (#3201, @eregon).Hash#shift
when Hash is empty but has initial default value or initial default proc (#3039, @itarato).Array#shuffle
produce the same results as CRuby (@rwstauner).Process.argv0
method (@andrykonchin).--pattern-matching
since pattern matching is not fully supported yet. (#2683, @razetime).Array#[]
with ArithmeticSequence
argument when step is negative (#3039, @itarato).Range#size
and return nil
for beginningless Range when end isn't Numeric (#3039, @rwstauner).String#-@
to String#dedup
(#3039, @itarato).Pathname#relative_path_from
to convert string arguments to Pathname objects (@rwstauner).String#bytesplice
(#3039, @itarato).String#byteindex
and String#byterindex
(#3039, @itarato).rb_proc_call_with_block
, rb_proc_call_kw
, rb_proc_call_with_block_kw
and rb_funcall_with_block_kw
(#3068, @andrykonchin).timeout
argument to Thread::Queue#pop
(#3039, @itarato).timeout
argument to Thread::SizedsQueue#pop
(#3039, @itarato).long long
and aliases in Fiddle
(#3128, @eregon).Module#refinements
(#3039, @itarato).Refinement#refined_class
(#3039, @itarato).rb_hash_new_capa
function (#3039, @itarato).Encoding::Converter#primitive_convert
and raise FrozenError
when a destination buffer argument is frozen (@andrykonchin).Module#undefined_instance_methods
(#3039, @itarato).Thread.each_caller_location
(#3039, @itarato).timeout
argument to Thread::SizedQueue#push
(#3039, @itarato).rb_syserr_new
function (@rwstauner).Enumerator#product
(#3039, @itarato).Module#const_added
(#3039, @itarato).FFI::Pointer#inspect
(@nirvdrum).Warning[:performance]
) like in CRuby 3.3 (@eregon).Marshal.dump
is now compatible with CRuby for Rational
and Complex
instances (#3228, @eregon).Truffle::FeatureLoader.loaded_feature_path
by removing expensive string ops from a loop. Speeds up feature lookup time (#3010, @itarato).String#-@
performance by reducing unnecessary data copying and supporting substring lookups (@nirvdrum)Array#<<
and related methods appending elements per call site to have a single array storage strategy in the inline cache for most cases (@eregon).gu install $LANGUAGE
is replaced by truffleruby-polyglot-get $LANGUAGE
, available in the TruffleRuby JVM standalone (@eregon).ScriptEngine
implementation is removed in favor of the generic ScriptEngine in GraalVM docs (@eregon).RubyLibrary
with FreezeNode
and IsFrozenNode
(@horakivo).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/
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/
New features:
foreign_object.is_a?(foreign_meta_object)
is now supported (@eregon).Numeric
operators (@eregon).Bug fixes:
ensure
(#2758, @eregon).spawn(..., fd => fd)
on macOS, it did not work due to a macOS bug (@eregon).rb_gc_register_address()
/rb_global_variable()
to read the latest value (#2721, #2734, #2720, @eregon).StringIO#write(str)
when str
is of an incompatible encoding and position < buffer size (#2770, @eregon).rb_thread_fd_select()
to correctly initialize fdset copies and handle the timeout (@eregon).TracePoint#inspect
when it's called outside of a callback (@andrykonchin).Signal.trap
when signal argument is not supported (#2774, @andrykonchin).Dir.mkdir
and convert permissions argument to Integer
(#2781, @andrykonchin).String#dump
and use \u{xxxx}
notation (with curly brackets) for characters that don't fit in \uxxxx
(#2794, @andrykonchin).Marshal.dump
when big Integer (that cannot be expressed with 4 bytes) is serialized (#2790, @andrykonchin).Array#pack
and accept Numeric
values when Float
is expected (#2815, @andrykonchin).\P{}
matching in regular expressions (#2798, @andrykonchin).BasicObject#instance_eval
method is called with a String (#2810, @andrykonchin).method_added
event when changing a method's visibility or calling module_function
(@paracycle, @nirvdrum).rb_time_timespec_new
function to not call Time.at
method directly (@andrykonchin).StringIO#write
to transcode strings with encodings that don't match the StringIO
's external_encoding
. (#2839, @flavorjones)Monitor#exit
to raise ThreadError
when monitor not owned by the current thread (#2922, @andrykonchin).MatchData#[]
to support negative length
argument (#2929, @andrykonchin).IO
line reading calls when using a multi-byte delimiter (IO#{each,gets,readline,readlines,etc.}
) (#2961, @vinistock, @nirvdrum).NoMethodError
(#2903, @paracycle, @nirvdrum).Method
and Proc
#parameters
method to return _
parameter name without synthetic suffix when there are multiple _
parameters (@paracycle).Dir.glob
returning blank string entry with leading **/
in glob and base:
argument (@rwstauner).Compatibility:
MatchData#[]
when passed unbounded Range (#2755, @andrykonchin).rb_define_class
, rb_define_class_under
, and rb_define_class_id_under
to allow class names that aren't valid in Ruby (#2739, @nirvdrum).rb_gv_get
so that it no longer implicitly creates global variables (#2748, @nirvdrum).rb_gvar_val_getter
and rb_define_virtual_variable
(#2750, @nirvdrum).rb_warning_category_enabled_p
to support the syntax_tree
gem (#2764, @andrykonchin).#to_ary
dynamically (#2719, @andrykonchin).Kernel#Complex
and raise exception when an argument is formatted incorrectly (#2765, @andrykonchin).#public?
, #private?
and #protected?
methods for Method
and UnboundMethod
classes (@andrykonchin).Thread::Queue.new
(@andrykonchin).Kernel#load
(@andrykonchin).Struct#valies_at
- raise IndexError
or RangeError
when arguments are out of range (#2773, @andrykonchin).MatchData#values_at
and handling indices that are out of range (#2783, @andrykonchin).%-z
(UTC for unknown local time offset, RFC 3339) to Time#strftime
(@andrykonchin).UTC
and A
-Z
utc offset values, as well as +/-HH
, +/-HHMM
, +/-HHMMSS
(without :
) (@andrykonchin).UTC
, Z
and -00:00
utc offset as UTC time (@andrykonchin).FrozenError
when Time#localtime
, Time#utc
and Time#gmtime
is called on a frozen time object (@andrykonchin).dmark
and dfree
fields for RData
(#2771, @eregon).rb_enc_nth()
(#2771, @eregon).offset
keyword argument for String#unpack
and String#unpack1
(@andrykonchin).Process.detach
and cast pid
argument to Integer
(#2782, @andrykonchin).rb_to_id()
should create a static ID
, used by RMagick (@eregon).$HOME
is not set (#2784, @eregon)IO#lineno=
and convert argument to Integer
more strictly (#2786, @andrykonchin).IO#pos=
and IO#seek
methods (#2787, @andrykonchin).Array#pack
in verbose mode (#2791, @andrykonchin).IO::SEEK_DATE
and IO::SEEK_HOLE
(#2792, @andrykonchin).StringIO.new
to accept keyword arguments (#2793, @andrykonchin).Process#spawn
should call #to_io
on non-IO file descriptor objects (#2809, @jcouball).IO::SEEK_DATE
and IO::SEEK_HOLE
(#2792, @andrykonchin).Class#subclasses
method (#2733, @andrykonchin).Coverage.running?
method (@andrykonchin).Enumerable#zip
and Array#zip
(#2788, @andrykonchin).Array#unshift
to not depend on Array#[]=
and allow overriding #[]=
in a subclass (#2772, @andrykonchin).void value expression
(#2821, @eregon).Range#step
with no block and non-Numeric
values (#2824, @eregon).END
blocks and at_exit
callbacks (#2818, @andrykonchin).String#casecmp?
for empty strings of different encodings (#2826, @eregon).Enumerable#compact
and Enumerator::Lazy#compact
(#2733, @andrykonchin).Array#intersect?
(#2831, @nirvdrum).module
/class
keywords (#2833, @eregon).File.open
and support flags
option (#2820, @andrykonchin).RData.dfree
for native extensions (#2830, #2732, #2165, @eregon).IO#write
and support multiple arguments with different encodings (#2829, @andrykonchin).Array
methods reject
, reject!
, inject
, map
, select
, each_index
and handle a case when array is modified by a passed block like CRuby does (#2822, andrykonchin, @eregon).EncodingError
exception message when Symbol has invalid encoding (#2850, @andrykonchin).EncodingError
at parse time when Hash literal contains a Symbol key with invalid encoding (#2848, @andrykonchin).Array
methods reject
, reject!
, inject
, map
, select
, each_index
and handle a case when array is modified by a passed block like CRuby does (#2822, @andrykonchin, @eregon).Array
methods select!
and keep_if
and handle a case when exception is raised in a passed block properly (@andrykonchin).Enumerable
methods each_cons
and each_slice
to return receiver (#2733, @horakivo)Module
methods #private
, #public
, #protected
, #module_function
now returns their arguments like in CRuby 3.1 (#2733, @horakivo)Kernel#exit!
, killing Fibers and internal errors do not run code in ensure
clauses anymore, the same as CRuby (@eregon).UnboundMethod#original_name
(@paracycle, @nirvdrum).Thread#native_thread_id
method (#2733, @horakivo).Struct#{inspect,to_s}
to match MRI when the struct is nested inside of an anonymous class or module (@st0012, @nirvdrum).Fiber.current
and Fiber#transfer
are available without require 'fiber'
like in CRuby 3.1 (#2733, @eregon).freeze
keyword argument to Marshal.load
(#2733, @andrykonchin).Integer.try_convert
(#2733, @moste00, @eregon).:in
keyword argument for Time.now
and Time.new
(#2733, @andrykonchin).Hash
argument to Enumerable#tally
(#2733, @andrykonchin).$LOAD_PATH.resolve_feature_path
to return nil
instead of raising LoadError
when feature isn't found (#2733, @andrykonchin).objspace/trace
file (#2733, @andrykonchin).Process._fork
(#2733, @horakivo).MatchData#match
and MatchData#match_length
(#2733, @horakivo).StructClass#keyword_init?
method (#2377, @moste00).level
argument for File.dirname
method (#2733, @moste00).Thread::Backtrace.limit
method (#2733, @andrykonchin).rb_gc_force_recycle
and make it a no-op function (#2733, @moste00).Refinement#import_methods
method and add deprecation warning for Refinement#include
and Refinement#prepend
(#2733, @horakivo).UNICODE
version to 13.0.0 and EMOJI
version to 13.1 (#2733, @horakivo).rb_io_maybe_wait_readable
, rb_io_maybe_wait_writable
and rb_io_maybe_wait
functions (#2733, @andrykonchin).StringIO#set_encoding
should coerce the argument to an Encoding (#2954, @eregon).IO#wait
(#2953, @larskanis).Pathname#relative_path_from
to convert string arguments to Pathname objects (@rwstauner).rb_io_descriptor()
(@eregon).Performance:
cloneUninitialized()
(@andrykonchin, @eregon).Process.pid
is now cached per process like $$
(#2882, @horakivo)libyaml
for psych
to improve warmup when parsing YAML (#2089, @eregon).Array
which is growing over multiple calls at a given call site (@eregon).Changes:
Truffle::Interop.deproxy
as it is unsafe and not useful (@eregon).Truffle::Interop.unbox_without_conversion
(should not be needed by user code) (@eregon).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/
New features:
foreign_object.is_a?(foreign_meta_object)
is now supported (@eregon).Numeric
operators (@eregon).Bug fixes:
ensure
(#2758, @eregon).spawn(..., fd => fd)
on macOS, it did not work due to a macOS bug (@eregon).rb_gc_register_address()
/rb_global_variable()
to read the latest value (#2721, #2734, #2720, @eregon).StringIO#write(str)
when str
is of an incompatible encoding and position < buffer size (#2770, @eregon).rb_thread_fd_select()
to correctly initialize fdset copies and handle the timeout (@eregon).TracePoint#inspect
when it's called outside of a callback (@andrykonchin).Signal.trap
when signal argument is not supported (#2774, @andrykonchin).Dir.mkdir
and convert permissions argument to Integer
(#2781, @andrykonchin).String#dump
and use \u{xxxx}
notation (with curly brackets) for characters that don't fit in \uxxxx
(#2794, @andrykonchin).Marshal.dump
when big Integer (that cannot be expressed with 4 bytes) is serialized (#2790, @andrykonchin).Array#pack
and accept Numeric
values when Float
is expected (#2815, @andrykonchin).\P{}
matching in regular expressions (#2798, @andrykonchin).BasicObject#instance_eval
method is called with a String (#2810, @andrykonchin).method_added
event when changing a method's visibility or calling module_function
(@paracycle, @nirvdrum).rb_time_timespec_new
function to not call Time.at
method directly (@andrykonchin).StringIO#write
to transcode strings with encodings that don't match the StringIO
's external_encoding
. (#2839, @flavorjones)Monitor#exit
to raise ThreadError
when monitor not owned by the current thread (#2922, @andrykonchin).MatchData#[]
to support negative length
argument (#2929, @andrykonchin).IO
line reading calls when using a multi-byte delimiter (IO#{each,gets,readline,readlines,etc.}
) (#2961, @vinistock, @nirvdrum).NoMethodError
(#2903, @paracycle, @nirvdrum).Method
and Proc
#parameters
method to return _
parameter name without synthetic suffix when there are multiple _
parameters (@paracycle).Compatibility:
MatchData#[]
when passed unbounded Range (#2755, @andrykonchin).rb_define_class
, rb_define_class_under
, and rb_define_class_id_under
to allow class names that aren't valid in Ruby (#2739, @nirvdrum).rb_gv_get
so that it no longer implicitly creates global variables (#2748, @nirvdrum).rb_gvar_val_getter
and rb_define_virtual_variable
(#2750, @nirvdrum).rb_warning_category_enabled_p
to support the syntax_tree
gem (#2764, @andrykonchin).#to_ary
dynamically (#2719, @andrykonchin).Kernel#Complex
and raise exception when an argument is formatted incorrectly (#2765, @andrykonchin).#public?
, #private?
and #protected?
methods for Method
and UnboundMethod
classes (@andrykonchin).Thread::Queue.new
(@andrykonchin).Kernel#load
(@andrykonchin).Struct#valies_at
- raise IndexError
or RangeError
when arguments are out of range (#2773, @andrykonchin).MatchData#values_at
and handling indices that are out of range (#2783, @andrykonchin).%-z
(UTC for unknown local time offset, RFC 3339) to Time#strftime
(@andrykonchin).UTC
and A
-Z
utc offset values, as well as +/-HH
, +/-HHMM
, +/-HHMMSS
(without :
) (@andrykonchin).UTC
, Z
and -00:00
utc offset as UTC time (@andrykonchin).FrozenError
when Time#localtime
, Time#utc
and Time#gmtime
is called on a frozen time object (@andrykonchin).dmark
and dfree
fields for RData
(#2771, @eregon).rb_enc_nth()
(#2771, @eregon).offset
keyword argument for String#unpack
and String#unpack1
(@andrykonchin).Process.detach
and cast pid
argument to Integer
(#2782, @andrykonchin).rb_to_id()
should create a static ID
, used by RMagick (@eregon).$HOME
is not set (#2784, @eregon)IO#lineno=
and convert argument to Integer
more strictly (#2786, @andrykonchin).IO#pos=
and IO#seek
methods (#2787, @andrykonchin).Array#pack
in verbose mode (#2791, @andrykonchin).IO::SEEK_DATE
and IO::SEEK_HOLE
(#2792, @andrykonchin).StringIO.new
to accept keyword arguments (#2793, @andrykonchin).Process#spawn
should call #to_io
on non-IO file descriptor objects (#2809, @jcouball).IO::SEEK_DATE
and IO::SEEK_HOLE
(#2792, @andrykonchin).Class#subclasses
method (#2733, @andrykonchin).Coverage.running?
method (@andrykonchin).Enumerable#zip
and Array#zip
(#2788, @andrykonchin).Array#unshift
to not depend on Array#[]=
and allow overriding #[]=
in a subclass (#2772, @andrykonchin).void value expression
(#2821, @eregon).Range#step
with no block and non-Numeric
values (#2824, @eregon).END
blocks and at_exit
callbacks (#2818, @andrykonchin).String#casecmp?
for empty strings of different encodings (#2826, @eregon).Enumerable#compact
and Enumerator::Lazy#compact
(#2733, @andrykonchin).Array#intersect?
(#2831, @nirvdrum).module
/class
keywords (#2833, @eregon).File.open
and support flags
option (#2820, @andrykonchin).RData.dfree
for native extensions (#2830, #2732, #2165, @eregon).IO#write
and support multiple arguments with different encodings (#2829, @andrykonchin).Array
methods reject
, reject!
, inject
, map
, select
, each_index
and handle a case when array is modified by a passed block like CRuby does (#2822, andrykonchin, @eregon).EncodingError
exception message when Symbol has invalid encoding (#2850, @andrykonchin).EncodingError
at parse time when Hash literal contains a Symbol key with invalid encoding (#2848, @andrykonchin).Array
methods reject
, reject!
, inject
, map
, select
, each_index
and handle a case when array is modified by a passed block like CRuby does (#2822, @andrykonchin, @eregon).Array
methods select!
and keep_if
and handle a case when exception is raised in a passed block properly (@andrykonchin).Enumerable
methods each_cons
and each_slice
to return receiver (#2733, @horakivo)Module
methods #private
, #public
, #protected
, #module_function
now returns their arguments like in CRuby 3.1 (#2733, @horakivo)Kernel#exit!
, killing Fibers and internal errors do not run code in ensure
clauses anymore, the same as CRuby (@eregon).UnboundMethod#original_name
(@paracycle, @nirvdrum).Thread#native_thread_id
method (#2733, @horakivo).Struct#{inspect,to_s}
to match MRI when the struct is nested inside of an anonymous class or module (@st0012, @nirvdrum).Fiber.current
and Fiber#transfer
are available without require 'fiber'
like in CRuby 3.1 (#2733, @eregon).freeze
keyword argument to Marshal.load
(#2733, @andrykonchin).Integer.try_convert
(#2733, @moste00, @eregon).:in
keyword argument for Time.now
and Time.new
(#2733, @andrykonchin).Hash
argument to Enumerable#tally
(#2733, @andrykonchin).$LOAD_PATH.resolve_feature_path
to return nil
instead of raising LoadError
when feature isn't found (#2733, @andrykonchin).objspace/trace
file (#2733, @andrykonchin).Process._fork
(#2733, @horakivo).MatchData#match
and MatchData#match_length
(#2733, @horakivo).StructClass#keyword_init?
method (#2377, @moste00).level
argument for File.dirname
method (#2733, @moste00).Thread::Backtrace.limit
method (#2733, @andrykonchin).rb_gc_force_recycle
and make it a no-op function (#2733, @moste00).Refinement#import_methods
method and add deprecation warning for Refinement#include
and Refinement#prepend
(#2733, @horakivo).UNICODE
version to 13.0.0 and EMOJI
version to 13.1 (#2733, @horakivo).rb_io_maybe_wait_readable
, rb_io_maybe_wait_writable
and rb_io_maybe_wait
functions (#2733, @andrykonchin).StringIO#set_encoding
should coerce the argument to an Encoding (#2954, @eregon).IO#wait
(#2953, @larskanis).Performance:
cloneUninitialized()
(@andrykonchin, @eregon).Process.pid
is now cached per process like $$
(#2882, @horakivo)libyaml
for psych
to improve warmup when parsing YAML (#2089, @eregon).Array
which is growing over multiple calls at a given call site (@eregon).Changes:
Truffle::Interop.deproxy
as it is unsafe and not useful (@eregon).Truffle::Interop.unbox_without_conversion
(should not be needed by user code) (@eregon).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/
Bug fixes:
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/
New features:
String
. They are treated as #frozen?
UTF-8 Ruby Strings (@eregon).Java.add_to_classpath
method to add jar paths at runtime (#2693, @bjfish).Polyglot::InnerContext.new
: languages, language_options, inherit_all_access, code_sharing
(@eregon).Bug fixes:
StringIO
to set position correctly after reading multi-byte characters (#2207, @aardvark179).Process
methods to use module_function
(@bjfish).File::Stat
's #executable?
and #executable_real?
predicates that unconditionally returned true
for a superuser (#2690, @andrykonchin).strip
option --keep-section=.llvmbc
is not supported on macOS (#2697, @eregon).String#split
missing a value in its return array when called with a pattern of " "
and a limit value > 0 on a string with trailing whitespace where the limit hasn't been met (@nirvdrum).Kernel#sleep
and Mutex#sleep
for durations smaller than 1 millisecond (#2716, @eregon).IO#{wait,wait_readable,wait_writable}
with a timeout > INT_MAX seconds (@eregon).String#{sub,gsub,index,rindex}
(#2749, @eregon).Compatibility:
Array#fill
to raise TypeError
instead of ArgumentError
when the length argument is not numeric (#2652, @andrykonchin)./
by Regexp#source
(#2569, @andrykonchin).IO.pipe
- allow overriding IO.new
that is used to create new pipes (#2692, @andrykonchin).\0
bytes (#2704, @eregon).#dup
and #clone
on foreign strings (@eregon).Regexp.new
to coerce non-String arguments (#2705, @andrykonchin).Kernel#sprintf
formatting for %c
when used non-ASCII encoding (#2369, @andrykonchin).Kernel#sprintf
argument casting for %c
(@andrykonchin).rb_enc_strlen
function for use by native extensions (@nirvdrum).rb_protect
and rb_jump_tag
for the tk
gem (#2556, @aardvark179).rb_eval_cmd_kw
to support the tk
gem (#2556, @aardvark179).rb_class2name
to call inspect
on anonymous classes like in CRuby (#2701, @aardvark179).rb_ivar_foreach
to iterate over instance and class variables like in CRuby (#2701, @aardvark179).Fiddle::Handle.new
with a missing library (#2714, @eregon).BasicObject#instance_eval
, Module#class_eval
, Module#module_eval
, Module#define_method
(@andrykonchin).ArgumentError
unconditionally when Proc.new
is called without a block argument (@andrykonchin).UnboundMethod#hash
to not depend on a module it was retrieved from (#2728, @andrykonchin).Performance:
-"string"
with frozen string literal at parse time (@andrykonchin).Hash#[]
to recover performance (@aardvark179).poll
instead of select
for simple IO waiting to reduce overheads (#1584, @aardvark179).Changes:
Truffle::Interop.{import_without_conversion,export_without_conversion}
(use Polyglot.{import,export}
instead).Truffle::Interop.members_without_conversion
(use Truffle::Interop.members
instead).rb_sprintf
to simplify handling of VALUE
s in common cases (@aardvark179).SharedArrayStorage
(@aardvark179).Security:
Truffle::FFI::Pointer
) is created (@eregon).