Releases: oracle/truffleruby
TruffleRuby - GraalVM Community Edition 1.0 RC6
TruffleRuby is high performance implementation of the Ruby programming language, compatible with MRI 2.4.4.
TruffleRuby is progressing fast but is currently probably not ready for you to try running your full Ruby application on. However it is ready for experimentation and curious end-users to try on their gems and smaller applications.
TruffleRuby runs Rails, and passes the majority of the Rails test suite. But it is missing support for Nokogiri and ActiveRecord database drivers which makes it not practical to run real Rails applications at the moment.
The Ruby language components can be installed in GraalVM using the gu utility.
Release Notes
New features:
Polyglot.export
can now be used with primitives, and will now convert
strings to Java, and.import
will convert them from Java.- Implemented
--encoding
,--external-encoding
,--internal-encoding
. rb_object_tainted
and similar C functions have been implemented.rb_struct_define_under
has been implemented.RbConfig::CONFIG['sysconfdir']
has been implemented.Etc
has been implemented (#1403).- The
-Xcexts=false
option disables C extensions. - Instrumentation such as the CPUSampler reports methods in a clearer way like
Foo#bar
,Gem::Specification.each_spec
,block in Foo#bar
instead of just
bar
,each_spec
,block in bar
(which is what MRI displays in backtraces). - TruffleRuby is now usable as a JSR 223 (
javax.script
) language. - A migration guide from JRuby (
doc/user/jruby-migration.md
) is now included. kind_of?
works as an alias foris_a?
on foreign objects.- Boxed foreign strings unbox on
to_s
,to_str
, andinspect
.
Bug fixes:
- Fix false-positive circular warning during autoload.
- Fix Truffle::AtomicReference for
concurrent-ruby
. - Correctly look up
llvm-link
alongclang
andopt
so it is no longer
needed to add LLVM toPATH
on macOS for Homebrew and MacPorts. - Fix
alias
to work when in a refinement module (#1394). Array#reject!
no longer truncates the array if the block raises an
exception for an element.- WeakRef now has the same inheritance and methods as MRI's version.
- Support
-Wl
linker argument for C extensions. Fixes compilation ofmysql2
andpg
. - Using
Module#const_get
with a scoped argument will now correctly
autoload the constant if needed. - Loaded files are read as raw bytes, rather than as a UTF-8 string and then
converted back into bytes. - Return 'DEFAULT' for
Signal.trap(:INT) {}
. Avoids a backtrace when quitting
a Sinatra server with Ctrl+C. - Support
Signal.trap('PIPE', 'SYSTEM_DEFAULT')
, used by the gemrouge
(#1411). - Fix arity checks and handling of arity
-2
forrb_define_method()
. - Setting
$SAFE
to a negative value now raises aSecurityError
. - The offset of
DATA
is now correct in the presence of heredocs. - Fix double-loading of the
json
gem, which led to duplicate constant
definition warnings. - Fix definition of
RB_NIL_P
to be early enough. Fixes compilation of
msgpack
. - Fix compilation of megamorphic interop calls.
Kernel#singleton_methods
now correctly ignores prepended modules of
non-singleton classes. Fixes loadingsass
whenactivesupport
is loaded.- Object identity numbers should never be negative.
Performance:
- Optimize keyword rest arguments (
def foo(**kwrest)
). - Optimize rejected (non-Symbol keys) keyword arguments.
- Source
SecureRandom.random_bytes
from/dev/urandom
rather than OpenSSL. - C extension bitcode is no longer encoded as Base64 to pass it to Sulong.
- Faster
String#==
using vectorization.
Changes:
- Clarified that all sources that come in from the Polyglot API
eval
method
will be treated as UTF-8, and cannot be re-interpreted as another encoding
using a magic comment. - The
-Xembedded
option can now be set set on the launcher command line. - The
-Xplatform.native=false
option can now load the core library, by
enabling-Xpolyglot.stdio
. $SAFE
andThread#safe_level
now cannot be set to1
- raising an error
rather than warning as before.-Xsafe
allows it to be set, but there are
still no checks.- Foreign objects are now printed as
#<Foreign:system-identity-hash-code>
,
except for foreign arrays which are now printed as#<Foreign [elements...]>
. - Foreign objects
to_s
now callsinspect
rather than Java'stoString
. - The embedded configuration (
-Xembedded
) now warns about features which may
not work well embedded, such as signals. - The
-Xsync.stdio
option has been removed - use standard Ruby
STDOUT.sync = true
in your program instead.
TruffleRuby - GraalVM Community Edition 1.0 RC5
TruffleRuby is high performance implementation of the Ruby programming language, compatible with MRI 2.4.4.
TruffleRuby is progressing fast but is currently probably not ready for you to try running your full Ruby application on. However it is ready for experimentation and curious end-users to try on their gems and smaller applications.
TruffleRuby runs Rails, and passes the majority of the Rails test suite. But it is missing support for Nokogiri and ActiveRecord database drivers which makes it not practical to run real Rails applications at the moment.
The Ruby language components can be installed in GraalVM using the gu
utility.
Release Notes
New features:
- It is no longer needed to add LLVM (
/usr/local/opt/llvm@4/bin
) toPATH
on macOS. - Improve error message when LLVM,
clang
oropt
is missing. - Automatically find LLVM and libssl with MacPorts on macOS (#1386).
--log.ruby.level=
can be used to set the log level from any launcher.- Add documentation about installing with Ruby managers/installers and how to
run TruffleRuby in CI such as TravisCI (#1062, #1070). String#unpack1
has been implemented.
Bug fixes:
- Allow any name for constants with
rb_const_get()
/rb_const_set()
(#1380). - Fix
defined?
with an autoload constant to not raise but returnnil
if the autoload fails (#1377). - Binary Ruby Strings can now only be converted to Java Strings if they only
contain US-ASCII characters. Otherwise, they would produce garbled Java Strings (#1376). #autoload
now correctly callsmain.require(path)
dynamically.- Hide internal file from user-level backtraces (#1375).
- Show caller information in warnings from the core library (#1375).
#require
and#require_relative
should keep symlinks in$"
and__FILE__
(#1383).- Random seeds now always come directly from
/dev/urandom
for MRI compatibility. - SIGINFO, SIGEMT and SIGPWR are now defined (#1382).
- Optional and operator assignment expressions now return the value
assigned, not the value returned by an assignment method (#1391). WeakRef.new
will now return the correct type of object, even ifWeakRef
is subclassed (#1391).- Resolving constants in prepended modules failed, this has now been fixed (#1391).
- Send and
Symbol#to_proc
now take account of refinements at their call sites (#1391). - Better warning when the timezone cannot be found on WSL (#1393).
- Allow special encoding names in
String#force_encoding
and raise an exception on bad encoding names (#1397). - Fix
Socket.getifaddrs
which would wrongly return an empty array (#1375). Binding
now remembers the file and line at which it was created for#eval
.
This is notably used bypry
'sbinding.pry
.- Resolve symlinks in
GEM_HOME
andGEM_PATH
to avoid related problems (#1383). - Refactor and fix
#autoload
so other threads see the constant defined while
the autoload is in progress (#1332). - Strings backed by
NativeRope
s now make a copy of the rope whendup
ed. String#unpack
now taints return strings if the format was tainted, and
now does not taint the return array if the format was tainted.- Lots of fixes to
Array#pack
andString#unpack
tainting, and a better
implementation ofP
andp
. - Array literals could evaluate an element twice under some circumstances.
Performance:
- Optimize required and optional keyword arguments.
rb_enc_to_index
is now faster by eliminating an expensive look-up.
Changes:
-Xlog=
now needs log level names to be upper case.-Dtruffleruby.log
andTRUFFLERUBY_LOG
have been removed -
use-Dpolyglot.log.ruby.level
.- The log format, handlers, etc are now managed by the Truffle logging system.
- The custom log levels
PERFORMANCE
andPATCH
have been removed.
TruffleRuby - GraalVM Community Edition 1.0 RC4
RC4 only updates the functionality of Graal JavaScript.
Therefore, RC4 does not update the functionality of the Ruby component compared to RC3.
Ruby users only need to update to RC4 if they want to use Ruby from GraalVM 1.0.0 RC4.
TruffleRuby - GraalVM Community Edition 1.0 RC3
TruffleRuby is high performance implementation of the Ruby programming language, compatible with MRI 2.4.4.
TruffleRuby is progressing fast but is currently probably not ready for you to try running your full Ruby application on. However it is ready for experimentation and curious end-users to try on their gems and smaller applications.
TruffleRuby runs Rails, and passes the majority of the Rails test suite. But it is missing support for Nokogiri and ActiveRecord database drivers which makes it not practical to run real Rails applications at the moment.
The Ruby language components can be installed in GraalVM using the gu
utility.
Release Notes
is_a?
can be called on foreign objects.Qnil
/Qtrue
/Qfalse
/Qundef
can now be used as initial value for global variables in C extensions.SIGPIPE
is correctly caught on SubstrateVM, and the corresponding write() raisesErrno::EPIPE
when the read end of a pipe or socket is closed (#1375).- Use the magic encoding comment for determining the source encoding when using eval() (#1376).
- Faster stat()-related calls, by returning the relevant field directly and avoiding extra allocations.
rb_str_new()
/rb_str_new_cstr()
are much faster by avoiding extra copying and allocations.String#{sub,sub!}
are faster in the common case of an empty replacement string.- Improved reading from
IO
with a delimiter (e.g.,IO#each
), improves e.g. iterating through lines in aFile
. - Use the byte[] of the given Ruby String when calling eval() directly for parsing.
- More details in https://github.com/oracle/truffleruby/blob/master/CHANGELOG.md
TruffleRuby - GraalVM Community Edition 1.0 RC2
TruffleRuby is high performance implementation of the Ruby programming language, compatible with MRI 2.4.4.
TruffleRuby is progressing fast but is currently probably not ready for you to try running your full Ruby application on. However it is ready for experimentation and curious end-users to try on their gems and smaller applications.
TruffleRuby runs Rails, and passes the majority of the Rails test suite. But it is missing support for Nokogiri and ActiveRecord database drivers which makes it not practical to run real Rails applications at the moment.
The Ruby language components can be installed in GraalVM using the gu
utility.
Release Notes
- TruffleRuby is now compatible with Ruby 2.4.4.
- object.class on a Java Class object will give you an object on which you can call instance methods, rather than static methods which is what you get by default.
- Java.import name imports Java classes as top-level constants.
- Coercion of foreign numbers to Ruby numbers now works.
- to_s works on all foreign objects and calls the Java toString.
- to_str will try to UNBOX and then re-try to_str, in order to provoke the unboxing of foreign strings.
- More details in https://github.com/oracle/truffleruby/blob/master/CHANGELOG.md
TruffleRuby - GraalVM Community Edition 1.0 RC1
TruffleRuby is high performance implementation of the Ruby programming language, compatible with MRI 2.3.7.
TruffleRuby is progressing fast but is currently probably not ready for you to try running your full Ruby application on. However it is ready for experimentation and curious end-users to try on their gems and smaller applications.
TruffleRuby runs Rails, and passes the majority of the Rails test suite. But it is missing support for Nokogiri and ActiveRecord database drivers which makes it not practical to run real Rails applications at the moment.
The Ruby language components can be installed in GraalVM using the gu
utility.