TruffleRuby - GraalVM Community Edition 19.1.0
Ruby is an experimental language in the GraalVM 19.1.0 release.
More information is available on the GraalVM website: http://www.graalvm.org/docs/reference-manual/languages/ruby/
Changes in 19.1.0:
Bug fixes:
- Sharing for thread-safety of objects is now triggered later as intended, e.g., when a second
Thread
is started. - Fixed
Array#to_h
so it doesn't set a default value (#1698). - Removed extra
public
methods onIO
(#1702). - Fixed
Process.kill(signal, Process.pid)
when the signal is trapped as:IGNORE
(#1702). - Fixed
Addrinfo.new(String)
to reliably find the address family (#1702). - Fixed argument checks in
BasicSocket#setsockopt
(#1460). - Fixed
ObjectSpace.trace_object_allocations
(#1456). - Fixed
BigDecimal#{clone,dup}
so it now just returns the receiver, per Ruby 2.5+ semantics (#1680). - Fixed creating
BigDecimal
instances from non-finiteFloat
values (#1685). - Fixed
BigDecimal#inspect
output for non-finite values (e.g, NaN or -Infinity) (#1683). - Fixed
BigDecimal#hash
to return the same value for twoBigDecimal
objects that are equal (#1656). - Added missing
BigDecimal
constant definitions (#1684). - Implemented
rb_eval_string_protect
. - Fixed
rb_get_kwargs
to correctly handle optional and rest arguments. - Calling
Kernel#raise
with a raised exception will no longer set the cause of the exception to itself (#1682). - Return a
FFI::Function
correctly for functions returning a callback. - Convert to intuitive Ruby exceptions when INVOKE fails (#1690).
- Implemented
FFI::Pointer#clear
(#1687). - Procs will now yield to the block in their declaration context even when called with a block argument (#1657).
- Fixed problems with calling POSIX methods if
Symbol#[]
is redefined (#1665). - Fixed sharing of
Array
andHash
elements for thread-safety of objects (#1601). - Fixed concurrent modifications of
Gem::Specification::LOAD_CACHE
(#1601). - Fix
TCPServer#accept
to set#do_not_reverse_lookup
correctly on the createdTCPSocket
.
Compatibility:
- Exceptions from
coerce
are no longer rescued, like MRI. - Implemented
Integer#{allbits?,anybits?,nobits?}
. Integer#{ceil,floor,truncate}
now accept a precision andInteger#round
accepts a rounding mode.- Added missing
Enumerable#filter
andEnumerator::Lazy#filter
aliases to the respectiveselect
method (#1610). - Implemented more
Ripper
methods as no-ops (#1694). - Implemented
rb_enc_sprintf
(#1702). - Implemented
ENV#{filter,filter!}
aliases forselect
andselect!
. - Non-blocking
StringIO
andSocket
APIs now supportexception: false
like MRI (#1702). - Increased compatibility of
BigDecimal
. String#-@
now performs string deduplication (#1608).Hash#merge
now preserves the key order from the original hash for merged values (#1650).- Coerce values given to
FFI::Pointer
methods. FrozenError
is now defined and is used forcan't modify frozen
object exceptions.StringIO
is now available by default like in MRI, because it is required by RubyGems.
Changes:
- Interactive sources (like the GraalVM polyglot shell) now all share the same binding (#1695).
- Hash code calculation has been improved to reduce hash collisions for
Hash
and other cases.
Performance:
eval(code, binding)
for a fixedcode
containing blocks is now much faster. This improves the performance of renderingERB
templates containing loops.rb_str_cat
has been changed to improve performance. THe C string is now concatentated without first being converted to a Ruby string or having its encoding checked. As a side effect the behaviour ofrb_str_cat
should now more closely match that of MRI.